SheetJS / sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs

Home Page:https://sheetjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The file name of the exported file not orignal headers but random code

EilyYa opened this issue · comments

In Linux system, Chrome, after I download the file, the filename will be random code like the picture show.
In other condition, not only the name, the suffix('.xlsx') is missing. If I add the '.xlsx' to the file, then it can open normally.

image

Can you reproduce the issue using the live demo in https://docs.sheetjs.com/docs/#export-an-html-table-to-excel-xlsx ? Click the "Export XLSX!" button. It should create a file SheetJSTable.xlsx

everything goes well in my computer, the random code is happened in other computer which is not at hand. But I try to find why the bug happens in limited resources. So could you give me some tips/thought to find it?

only the name is random text, the document content is correct

https://bugs.chromium.org/p/chromium/issues/detail?id=373182#c64

I'm guessing that the web page and the download are on different origins. We no longer honor the download attribute suggested filename for cross origin requests. Clicking on the link still initiates a download. But the the filename is only derived from factors solely dependent on the server (e.g. Content-Disposition header in the response and the URL).

The download logic depends on the browser APIs, so the best recommendations are:

A) raise an issue in the chromium bug tracker.

B) consider doing the export on the server side.

ok,thank you for helping and suggesting