Quantcast
Viewing all articles
Browse latest Browse all 82150

Output to Excel as .xls (not .xlsx or .csv)

Hi Allan,

I've been playing around with exporting to Excel, and TableTools + DataTables works well for exporting to .csv files. The issue as you know is exporting to a formatted Excel file, and I've read a number of discussions here and elsewhere about the idea and problems of generating .xls and .xlsx from the browser.

Have you considered simply exporting the table as an HTML document with the .xls extension? Excel will accept it gracefully and attempt to preserve formatting, formulas, merged cells, and so on. It's not as elegant as writing the native XML and zipping it up into .xlsx directly, but I think it might be a simple workaround that's better than the current .csv-only solution.

Viewing all articles
Browse latest Browse all 82150

Trending Articles