а

export to excel - "excel can not open" problem


#1

I am getting a error when exporting to excel, excel 2007 presents an error “excel cannot open the file grid.xlsx because the file format or file extension is not valid. verify that the file has not been corrupted” MyGrid exports to PDF with no errors and using your online export to excel, the file work great. I believe I have the zip files extracted in the right places, any suggestions?
thanks


#2

Which version of export scripts you are using ( php, java, .net ) ?
Please provide the invalid xml file generated by the script


#3

Thanks , I’m using the PHP version

the debug xml follows…

thanks for your help


#4

Hi,
your xml is correct, it was exported at local machine in right way.
Please, provide generated excel file.
Also you could try to open gridExcelGenerator.php file and modify the follow line:

public $outputType = 'Excel2007'; // Excel2003 or Excel2007

Please, try to set opposite value.


#5

Thanks for the Help! Changing the output to Excel2003 from Excel2007 did the trick.

thanks again


#6

Ah yes changing to Excel2003 fixed for me too. There is some bug which fails 2007 export for the php version. The extension generated is always .xls though the content is 2007 format ( .xlsx)