Picture problem with Excel 2003

Topics: Developer Forum, User Forum
May 20, 2010 at 8:24 AM



we have a curious problem with a simple graphic in Excel 2003:

1. Step: Creation of an Excel document with a DropDown and a graphic:  (2010_05_20_muster_kalibrierung.xls / Screenshot: 2010_05_20_original.jpg).

2. Step: Run the code:   

include 'class/PHPExcel/Classes/PHPExcel/Writer/Excel2007.php';
include 'class/PHPExcel/Classes/PHPExcel/Writer/Excel5.php';
include 'class/PHPExcel/Classes/PHPExcel/Reader/Excel2007.php';

$objReader = new PHPExcel_Reader_Excel5();
$objPHPExcel = $objReader->load("2010_05_20_muster_kalibrierung.xls");

$tempfile = "2010_05_20_29032010_copy.xls";

try { $objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);

catch(Exception $exc)
echo "<br>".$exc;


The generated file:  2010_05_20_29032010_copy.xls


Step 3: Open this generatet file: Anything works great! (Screenshot: 2010_05_20_edit.jpg)

Step 4: Change something in the document (for example change the value of the DropDown and put something another cell)

Step 5: Save this file as 2010_05_20_29032010_copy_2.xls

Step 6: Open 2010_05_20_29032010_copy_2.xls:

           Now happens some curious effects: If we want to change the value of the DropDown field, the graphic jumps into the DropDown Field. (Screenshot: 2010_05_20_edit2.jpg)


All this happens if we work with Excel 2003, with Excel2007 it seems that we have no problem at all.


This effect appears only if we open the document and save it with the PHPExcel_Writer/PHPExcel_Reader


Please can you check the code or the class if there is anything false.


All documents/screenshots you can find under: http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749


Thank you very much.


Best regards,


Jun 3, 2010 at 12:30 PM

Very strange. I can verify this. I will start running some tests now.

Jun 5, 2010 at 3:39 PM

Error may have been located.

Look at this file which behaves ok in Microsoft Office Excel 2003:


It is the same as 2010_05_20_29032010_copy_2.xls (the buggy one), only thing I changed was one byte at address 0x000009aa in the binary file.
01 ---> 02

It is within the msofbtDgg (0xF006) record in MSODRAWINGGROUP. Excel5 writer is apparently not writing it correctly. I am looking for a fix.

Jun 6, 2010 at 12:45 AM

Work item created:

I think it is fixed now. Please try to run your tests again with latest source code.