Working good on Excel 2007 but not on Excel 2003

Topics: Developer Forum, Project Management Forum, User Forum
Feb 10, 2010 at 11:46 PM

Hi all,

How is it going? I would like to make it work for both of 2003 and 2007, but currently it's only working on 2007.

Could you please tell me how to fix this problem?

Here is my code as below:

<font size="2">

 

</font>

$filename = test.'.xls';

header('Content-Type: application/vnd.ms-excel');<font size="2">

 

</font>

header('Content-Disposition: attachment;filename='.$filename);

<font size="2">

 

</font>

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

<font size="2">

 

</font>

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

exit;

Coordinator
Feb 11, 2010 at 12:05 AM

What are the <font size="2"> and </font> in your sample code?

Are you getting any error messages? Have you set your code to display all errors?

Is a file being generated?

Feb 11, 2010 at 12:11 AM

File is generated but the problem is that excel file can't get an image file on excel 2003, but working good on excel 2007.

You can ignore <font></font>. Just pretend it's not <font></font> there, once I have posted my code, it's automatically created on forum.

Developer
Feb 19, 2010 at 1:04 AM
shumoher wrote:

File is generated but the problem is that excel file can't get an image file on excel 2003, but working good on excel 2007.

You can ignore <font></font>. Just pretend it's not <font></font> there, once I have posted my code, it's automatically created on forum.

How does your code look where you are inserting the images?

 

Mar 25, 2010 at 5:14 AM

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.

 

This is the error I have got

Developer
Mar 26, 2010 at 5:28 AM

Can you upload the broken Excel file here:

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