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.
// xlsx.js, line #54:
if (s = zip.file('xl/sharedStrings.xml')) { // Process sharedStrings
s = s.asText().split(/<t.*?>/g); i = s.length;
while(--i) {
sharedStrings[i - 1] = unescapeXML(s[i].substring(0, s[i].indexOf('</t>')));
} // Do not process i === 0, because s[0] is the text before first t element
}
an '<si>' element can have multiple '<t>' elements, so above code can cause (logical) parsing errors for particular files.
if (s = zip.file('xl/sharedStrings.xml')) { // Process sharedStrings
s = s.asText().split(/<si.*?>/g); i = s.length;
while(--i) {
sharedStrings[i - 1] = unescapeXML(s[i].replace(/<\/?[^>]+(>|$)/g, ''));
} // Do not process i === 0, because s[0] is the text before first t element
}
in my case, i changed the code like above, then the issue had solved.
// xlsx.js, line #54: if (s = zip.file('xl/sharedStrings.xml')) { // Process sharedStrings s = s.asText().split(/<t.*?>/g); i = s.length; while(--i) { sharedStrings[i - 1] = unescapeXML(s[i].substring(0, s[i].indexOf('</t>'))); } // Do not process i === 0, because s[0] is the text before first t element }
an '<si>' element can have multiple '<t>' elements, so above code can cause (logical) parsing errors for particular files.
if (s = zip.file('xl/sharedStrings.xml')) { // Process sharedStrings s = s.asText().split(/<si.*?>/g); i = s.length; while(--i) { sharedStrings[i - 1] = unescapeXML(s[i].replace(/<\/?[^>]+(>|$)/g, '')); } // Do not process i === 0, because s[0] is the text before first t element }
in my case, i changed the code like above, then the issue had solved.