Enterprise: Datagrid: Export to Excel causes Excel to display file extension warning

Created on 17 Oct 2019  路  6Comments  路  Source: infor-design/enterprise

Describe the bug
Hi, when using exportToExcel method in Datagrid and opening the exported file, Excel is displaying a message:
_The file format and extension of 'xxxxx.xls' don't match_

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://design.infor.com/code/ids-enterprise/latest/demo/components/datagrid/example-export-from-button
  2. Click on 'Export to Excel' button
  3. Open exported file
  4. See message

Expected behavior
When exporting CSV we don't get that message (but there are Unicode issues in CSV)

Version

  • ids-enterprise: v4.22.0 (but also seen in earlier versions)

Screenshots
excel-export

Platform

  • OS Version: [e.g. Windows 7 and 10
  • Excel 2013 / 2019

Additional context
Thanks

[5] refactor type

All 6 comments

Unfortunately. There does not seem to be any solution for this. We did try this in the past.
BTW: Nothing no https://stackoverflow.com/questions/28403642/how-to-fix-file-format-and-extension-dont-match seems to work.

Also this is a warning.

Will leave it open for a while in case someone has a new suggestion. But for many years we have tried to fix this unsuccessfully. We cant get around the browser warnings.

Thanks.
Before opening this issue I've checked if Excel export works "properly" in DataTables
https://datatables.net/extensions/buttons/examples/initialisation/export.html
and it does - although they export in xlsx format.

Hmm i see. I guess we would have to change the entire export procedure to use the binary xlsx format.... Might be doable. Can also dig into their code and see how they do it.

Can look at what https://tableexport.v5.travismclarke.com/#install-manually-using-less-than-script-greater-than-tags is doing (note to self)

Closing this as a duplicate instead of in favor of https://github.com/infor-design/enterprise/issues/4709

Was this page helpful?
0 / 5 - 0 ratings