-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xlsx file Open with issue Firefox only #139
Comments
Firefox might be checking magic numbers and overriding the mime type if it's a zip (xlsx is a zip file filled with a bunch of XML) even though there are zip-contained formats like the one you're using. I suggest that you also file this issue on https://bugzilla.mozilla.org/ and link to the issue here after filing it there, so I can keep up with the issue as well. |
I ran into the same issue and was able to resolve it. It is neither an issue with FileSaver nor Firefox. Firefox behaves correctly, because the file you are trying to save actually IS a zip file. ExcelBuilder just returns JSZip's output, which unsurprisingly has the zip mime type. Try this instead:
|
Sorry for the delayed reply. I updated the excel export code to use the type: "uint8array". Works perfectly on FF/Chrome/IE. Thanks again. |
Hi, |
I am using excel-builder.js library to create the excel data and FileSaver.js to save this file.
Below is my code for saving:
testDataWorkbook.addWorksheet(testData);
saveAs(ExcelBuilder.createFile(testDataWorkbook, {
type: "blob"
}), "test.xlsx");
Which works just fine in chrome and IE.
The problem I am getting with Firefox is while doing "Open with" the file which gets created is
"test.xlsx.zip" which then throws a warning of different format than specified by the file extension.
Any help on the issue is much appreciated.
The text was updated successfully, but these errors were encountered: