Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: Using images with fromArray

$
0
0
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:
...
$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?

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>