when I use js-xlsx to read a file that save by mac OS System, I will get an error:
Uncaught Error: CLSID: Expected 00000000000000000000000000000000 saw 2008020000000000c000000000000046
at Array.CheckField [as chk] (xlsx.js?1146:3318)
at check_get_mver (xlsx.js?1146:1444)
at parse (xlsx.js?1146:1355)
at Object.read (xlsx.js?1146:1660)
at Object.readSync [as read] (xlsx.js?1146:20309)
and than I try to read the same file your websit demo, also I got the same error
wps?
wps?
yes
after edited my file with WPS.
I got the same error in
XLSX.read(fs.readFileSync(file))
But I can read the original file
xls edited with wps fail to parse
save as xlsx then success
thanks, I try it.
陈杰
犀牛之星服务号
联系我
------------------ 原始邮件 ------------------
发件人: "billtsu"notifications@github.com;
发送时间: 2019年6月10日(星期一) 下午3:13
收件人: "SheetJS/js-xlsx"js-xlsx@noreply.github.com;
抄送: "1052957708"1052957708@qq.com; "Author"author@noreply.github.com;
主题: Re: [SheetJS/js-xlsx] Error on xlsx.readFile('xxx.xlsx'. options),when the file is save by mac OS System (#1419)
xls edited with wps fail to parse
save as xlsx then success
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@CHJ1993 @billtsu can you share an example file ?
------------------ 原始邮件 ------------------
发件人: "SheetJSDev"notifications@github.com;
发送时间: 2019年6月10日(星期一) 下午5:40
收件人: "SheetJS/js-xlsx"js-xlsx@noreply.github.com;
抄送: "1052957708"1052957708@qq.com;"Mention"mention@noreply.github.com;
主题: Re: [SheetJS/js-xlsx] Error on xlsx.readFile('xxx.xlsx'. options),when the file is save by mac OS System (#1419)
@CHJ1993 @billtsu can you share an example file ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Got the same problem... waiting to be solved!!!
@CHJ1993 @xjnotxj you can't attach via email to github, send us a file directly [email protected]
陈杰
犀牛之星服务号
联系我
------------------ 原始邮件 ------------------
发件人: "SheetJSDev"notifications@github.com;
发送时间: 2019年6月10日(星期一) 下午5:56
收件人: "SheetJS/js-xlsx"js-xlsx@noreply.github.com;
抄送: "1052957708"1052957708@qq.com; "Mention"mention@noreply.github.com;
主题: Re: [SheetJS/js-xlsx] Error on xlsx.readFile('xxx.xlsx'. options),when the file is save by mac OS System (#1419)
@CHJ1993 @xjnotxj you can't attach via email to github, send us a file directly [email protected]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@xjnotxj thank you very much for sharing!
The first 32 bytes of the sample file are:
d0 cf 11 e0 a1 b1 1a e1
20 08 02 00 00 00 00 00
c0 00 00 00 00 00 00 46
3e 00 03 00 fe ff 09 00
MS-CFB 2.2 states that the second and third lines are the "Header CLSID" and "MUST be set to all zeroes". Clearly the file has nonzero data, which is why the library errors. We will need to fix the dependency https://github.com/SheetJS/js-cfb first before updating here.
@SheetJSDev Oh! So that explains it. wait for your development follow-up! thanks!
Commit 9aabf361422d3af0ae461d14708d8ccc74977016 should have referenced this issue, @xjnotxj it has been live since 0.14.4, please update and confirm.
Most helpful comment
@xjnotxj thank you very much for sharing!
The first 32 bytes of the sample file are:
MS-CFB 2.2states that the second and third lines are the "Header CLSID" and "MUST be set to all zeroes". Clearly the file has nonzero data, which is why the library errors. We will need to fix the dependency https://github.com/SheetJS/js-cfb first before updating here.