JsObjExporter
JsObjExporter copied to clipboard
Security Alert on xls file opening
Describe the bug
Security alert on xls opening
To Reproduce Steps to reproduce the behavior:
- Generate an xsl file.
- Open it with Excel (Max OS Excel for Mac 16.21.1)
- You got the screenshotted alert message
Expected behavior No error message
Screenshots
Sorry for the french, it means
"Format and extension of the file ... do not match. The file can be of risk or have been dammaged. Do not open it, unlessyou trust the source. Do you stillwant to open it?"
hi there! thanks for using this library. Pas de soucis je parle un peu français 😄
MS Excel recognizes 2 different formats natively: (1) binary and (2) the zipped up XML. Also various extensions and MIME types are assigned to these formats. What In this library I am simulating the binary format.
I guess the issue here is that I'm using base64
for the binary conversion whereas uint8array
should be used.
I will check this out asap and will get back to you,
Hello !
First, thank you for your library, it rocks!
Do you have any update @gharibi?
HI there. Thanks for using this library. Unfortunately due to huge workload I couldn't work on this. Considering the solution which I have written, feel free to take a look at this issue if you have time.
Can you provide a usecase or example on jsfiddle to test this and I may be able to look at https://github.com/gharibi/JsObjExporter/blob/master/src/js/xls.js#L17 and see if base64 can be replaced with unit8array to solve the mismatch on format. Will create a PR if it does and might be good to have that as an option on xls to provide format you want.