Hi there,
I am currently printing out data to an excel sheet and each piece of data has an image associated to it. I would like to do something like:
Is there a way to make this work or do I have to rewrite my code to use iterators instead of fromArray?
I am currently printing out data to an excel sheet and each piece of data has an image associated to it. I would like to do something like:
...
$table = array();
foreach($dataset as $data){
$drawing = new PHPExcel_Worksheet_MemoryDrawing();
$drawing->setImageResource($data->getImage());
...
$table[] = array($drawing);
}
$objPHPExcel->getActiveSheet()->fromArray($table);
...
Sadly fromArray does not seem to accept drawings inside the array. But I also do not want to statically set the coordinates of every image myself. Is there a way to make this work or do I have to rewrite my code to use iterators instead of fromArray?