Skip to content

Use in browser - issue while opening generated excel #18

@ikochetkov

Description

@ikochetkov

Using your code from README.md - successfully generated workbook and got in running in dev(Thanks for this!) (locally, and in dev it works, however , after deployment to TEST env it downloaded and says me when I'm trying to open it: Excel could not be opened....because file format or file extension is not valid.
Difference in size: 2kb, 116 vs 118(valid)
I had same issue with XLSX library, that time I used different bookType - changed xlsx to xls - and it was fine ( XLSX.writeFile(workbook, statements_export_${new Date().toUTCString()}.xls, { bookType: 'xls' });
Any suggestions for my case?
image
NOTwork.xlsx
works.xlsx

P.S: by the way interesting that both excels have content type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet instead of that which we set in mimeType - application/vnd.ms-excel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions