Excel problem -- Different format than specified by the file extension ??

Excel problem -- Different format than specified by the file extension ??

meoshaughmeoshaugh Posts: 4Questions: 0Answers: 0
edited September 2010 in TableTools
I am seeing a problem when trying to open the excel file. If I run the demo at http://datatables.net/release-datatables/extras/TableTools/, use the save to excel option, then try to open the file in excel, I get this error:

"The file you are trying to open, (file name), is in a different format than specified by the file extension...
Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

How can I prevent this warning? My users are getting alarmed/confused.

Thanks,
Marian

Replies

  • allanallan Posts: 54,882Questions: 1Answers: 8,601 Site admin
    This is because the file is actually basically just a CSV file with an XLS extension to make it open in Excel. See this Microsoft doc for more information: http://support.microsoft.com/kb/948615 - it happens in new versions of Excel. Older ones will happily export them.

    The reason for doing it this way was because it is so much simpler to export a CSV file than an Excel one. I'd like to write a proper Excel exporter sometime, but that will take time to read and understand the Excel file format, and I've not had a chance to do that yet.

    One option is simply to rename the file name to .csv, and keep the user interface as saying that it is an Excel file (Excel is quite happy to read csv files). Given that Windows tends to hide the file extension, this seems like a fairly attractive option.

    Allan
  • zlatan24zlatan24 Posts: 1Questions: 0Answers: 0
    edited November 2010
    As a matter of fact exist some tools for resolving troubles with excel documents and one of them consist of only a tool. It was my theory and not more. But some times this application saved my time. It would be helpful solution for solving varied kinds of excel problems - http://www.recoverytoolbox.com/recover_excel_files.html
  • sebnapisebnapi Posts: 3Questions: 0Answers: 0
    zlatan24: SPAM!
This discussion has been closed.