Cannot open exported xlsx file containing Japanese character #2522
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2522
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, thanks for this amazing library.
Issue: I am using to SheetJS export array of arrays with each element is a Japanese characters to xlsx file. So far, I have tried with xlsb file working fine but when I tried to export it to xlsx file and open it, excel reports an error in XML parsing. Here are my code:
I tried switching array of arrays contains only Latin characters worked, or one row and Latin character and one row Japanese characters also worked. But 2 rows of Japanese characters next to each other make the output file error.
This is the output I wants look like this
Hope you could give me some insight, thanks.
Are you using the latest version?
console.log(XLSX.version)
when you do the export.If you are using the latest version (0.18.1) can you share the data or the broken XLSX file?
Hi,
console.log(XLSX.version
) showing that I am using 0.18.1.Here is the file
90_自社評価・表示_登録用項目 (2).xlsx
Can you share the broken file? You can click-drag the file into the github issue box ("Attach files by dragging & dropping, selecting or pasting them.")
When opening the file, I got error like this:
For more information, here is my array of arrays object:
Since I export the workbook in binary, I use a converter function to convert binary to octet:
The resulting XML looks truncated (sheet1.xml ends with
></
). Instead of manually doing all this, can you try forcing a download usingwriteFile
?This will create the file (like
XLSX.write
) and also attempt a download (like you are trying to do with the URL)Hi,
I have tested with
XLSX.writeFile(workbook,
${fileName}.xlsx)
, unfortunately, it did not work well for me. When open the output file, I got:Sorry for my hasty reply, I sent wrong image output above. When opening the file using
writeFile
. I encountered with:This is probably the same issue reported in #2521 , but by pure coincidence it did not trigger an invalid file for @lanchengkai . There is a truncation in the utf8 encoding and we'll rush an update.
Hi,
I tried to look at the output xlsx file as .xml document using zip tool, found that in sheet1.xml missing 3 closing tags as below:
I modified (add closing tags to sheet1.xml) and reopened the file output. The file opened without any error. Does this have any relation to how the
XLSX.write()
works or am I missing any step?I'm using Vue 2 framework for my web application, does
xlsx.full.min.js
install with thexlsx
npm package?No worries, can you try replacing the dependency with
xlsx-issue2522@0.18.1
?Hi,
Thanks for the quick action. The new package
[xlsx-issue2522@0.18.1](https://www.npmjs.com/package/xlsx-issue2522)
works as expected. Isxlsx-issue2552
temporary fix or will you incorporate it in the mainxlsx
package?It will be, just want to be sure we identified the root cause first.
May I ask when will the next stable release?
30 minutes-ish
Glad to hear it. That's all for now. Thanks for your swift and amazing support!
The node/deno tests passed (sauce labs grid will refresh momentarily, but it passed IE10/11 and Chrome and iOS Safari tests). The module has been published to npm (xlsx@0.18.2) and the tag has been pushed, it may take a few minutes for the registry to reload. Please verify, and sincere apologies for the issue in the first place.