XLSX.js is a JavaScript library for converting the data in base64 XLSX files into JavaScript objects - and back! Please note that this library is licensed under the Microsoft Office Extensible File License - a license NOT approved by the OSI. While this license is based off of the MS-PL, which is OSI-approved, there are significant differences.
I've got an implementation that works except for some uncommon and bizarre cases. So I've Isolated an example of a worksheet value that causes the issue.
The xlsx is created but when it's loaded in excel, the 2nd sheet is corrupted and empty after repair. Excel says it's an issue with the sheets.xml not having a single root node. My guess is that the file is empty on extract. This original value for worksheets causes the error (yes I know it's long but modifying it further tends to remove the bug):
If I copy the value of sheet 1 into sheet 2, It works fine. It's this one sheet that causes trouble. Those first two tricks don't need to be done on other sheets for them to work.
I've walked through the xlsx.js code while it runs and xlWorksheets.files.xl.worksheets.sheet2.xml looks exactly like the other sheets with a few different numbers. Any ideas? Do I need to provide more info?
I've got an implementation that works except for some uncommon and bizarre cases. So I've Isolated an example of a worksheet value that causes the issue.
The xlsx is created but when it's loaded in excel, the 2nd sheet is corrupted and empty after repair. Excel says it's an issue with the sheets.xml not having a single root node. My guess is that the file is empty on extract. This original value for worksheets causes the error (yes I know it's long but modifying it further tends to remove the bug):
Wow! You've found a huge value that makes it crash. Woopty freakin doo.
Here's where it gets weird. If i change worksheets[1].data[0][0] = " " instead of "", IT WORKS.
Here's another one. If i set worksheets[1].data[3][2] = " " instead of having it undefined, it also works.
Finally, If I remove the first sheet, it works.
If I copy the value of sheet 1 into sheet 2, It works fine. It's this one sheet that causes trouble. Those first two tricks don't need to be done on other sheets for them to work.
I've walked through the xlsx.js code while it runs and xlWorksheets.files.xl.worksheets.sheet2.xml looks exactly like the other sheets with a few different numbers. Any ideas? Do I need to provide more info?
Thanks