Export to excel

  
Hello,

I'm having a problem and I can't figure out the solution for it.

So basically, I have a webscreen with a table and I get the HTML for the table, transform it to binary and download it as an Excel file, but this error appears



I can open it and it looks just as I wanted to, but I don't know why, I'm the only one from the people that are working on the application, the others can't open the file, and I can't be sure the final users will open it as well.

I'm using the .xls extension on the download widget and the mime-type "application/vnd.ms-excel", and I also tried other mime-types used for excel files.

Thank you for the help.

try changing the extension of the file to ".xlsx".
I already tried that, and with that extension even I can't open it, gets an error for corrupted file.

Then try "application/octet-stream" on mime-type
I also tried that extension/mime-type combination, and I also can't open it.
I'm using that in a lot of apps with Excel 2010 and not getting that error. Do you have an older version of Excel?
I'm using Excel 2013
Hi,

The correct mimetype for xlsx is:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Try that with the extension of the file being .xlsx

Regards,
João Rosado
Hi João,

I also tried that extension and mime-type, it gives the same error and I can't open it.

What if you tried saving as a .csv file?
As .csv I can open it with no problem, but that's not really what we want.

EDIT: Now that I noticed, as .csv file, it only have the HTML, the actual data that fill the table is not there.