For the compatibility problem Excel 2003

Topics: Developer Forum, User Forum
Mar 21, 2010 at 11:34 PM

Hi,

I am using Excel 2007, and when I download my excel report which is created by php excel, it's working fine on excel 2007, but the client is using excel 2003, and they have got an error as below:

Errors were deteced in 'report.xls', but Microsoft Office Excel was able to open the file by making the repairs listed below.

Save the file to make these repairs permenent. Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.

They can open the file but all images and some txt alignment are gone, so it's quite funny data on that excel rerport file.

I suspect it's caused by a header, and have tried many things but still not working.

Please help me out at this stage!!

At this stage, I don't care it's not working on Excel 2007, what I need to do is that I need to make it work on Excel 2003.

Thanks,

Terry

Coordinator
Mar 22, 2010 at 9:33 PM

Are you saving the file using the Excel5 or the Excel2007 writer?

 

Mar 25, 2010 at 4:09 AM

 

 <font size="2" color="#660000"><font size="2" color="#660000">

$time

</font></font><font size="2" color="#660000">

 

</font>

= date("dmY");

<font size="2" color="#660000"><font size="2" color="#660000">

$filename

</font></font><font size="2" color="#660000">

 

</font>

= $time.'.xls';

heaer("Pragma: public");

 

 

<font size="2">

header(

</font>

"Expires: 0");<font size="2">

header(

</font>

"Cache-Control: must-revalidate, post-check=0, pre-check=0");<font size="2">

header(

</font>

"Content-Type: application/force-download");<font size="2">

header(

</font>

"Content-Type: application/octet-stream");<font size="2">

header(

</font>

"Content-Type: application/download");<font size="2">

header(

</font>

"Content-Disposition: attachment; filename=".$filename);<font size="2">

header(

</font>

"Content-Transfer-Encoding: binary");<font size="2">

 

</font>

$objWriter->save('php://output');

 

This is the header I use, please tell me if something is wrong with this.

 

Thanks

 

 

Developer
Mar 26, 2010 at 4:30 AM

I don't think the problem is with the headers. Can you upload the defect Excel file here:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749

Apr 14, 2010 at 5:43 AM

Hi!

I have the same problem. Do you have any idea how to solve it?

Thanks.

Developer
Apr 20, 2010 at 2:46 AM

@rommin: We will need some more information. Try to upload the file here:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749

Apr 28, 2010 at 6:42 AM
Thank you! I've solved the problem by installing the last vertion of PHPExcel