Style from a model

Mar 10, 2008 at 8:55 PM

I use a model file with a picture (based on reader.php).
But when i populate this file with data, the picture disapears in the final file !
I've got another problem with few font styles (bold) which are in the model and not in the ended-file.

Thanks for your help
Coordinator
Mar 11, 2008 at 9:22 AM
This has been reported in the past and only seems to occur on some configurations.
Can you try the following: edit PHPExcelWriterExcel2007.php. Around line 340, replace the following
				if ($this->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_Drawing) {
					$objZip->addFromString('xl/media/' . $this->getDrawingHashTable()->getByIndex($i)->getFilename(), file_get_contents($this->getDrawingHashTable()->getByIndex($i)->getPath()));
				}
with
				if ($this->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_Drawing) {
					$objZip->addFile($this->getDrawingHashTable()->getByIndex($i)->getPath(), 'xl/media/' . $this->getDrawingHashTable()->getByIndex($i)->getFilename());
				}
Mar 11, 2008 at 9:59 AM
Hi Maarten,

sorry, I haven't seen that this has been reported in the past.

I try your solution but still got an error with repaired Record.
I don't understand why, when I take your file 07reader.xlsx as model, everything is ok, and when I try with another, it turns wrong ?
Coordinator
Mar 11, 2008 at 10:15 AM
Can you email me the original + resulting file when ran on original PHPExcel version?
Mar 11, 2008 at 10:25 AM


maartenba wrote:
Can you email me the original + resulting file when ran on original PHPExcel version?

I send the files at maarten AT phpexcel =dot= net.
Coordinator
Mar 11, 2008 at 10:30 AM
Sounds like a missing feature: read image twoCellAnchor. Will create a work item!
Coordinator
Mar 11, 2008 at 10:37 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.