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

New Post: having trouble in opening .xlsx file

$
0
0

Also, I am unable to fetch photos when using .xlsx

but when i use .xls file i can fetch photos from Excel file using following code:

 

 

//------ Following is used to fetch and save images
$count = 1;
foreach ($objPHPExcel->getSheetByName("Photographs")->getDrawingCollection() as $drawing) {
	if ($drawing instanceof PHPExcel_Worksheet_MemoryDrawing) {
		ob_start();
		call_user_func(
			$drawing->getRenderingFunction(),
			$drawing->getImageResource()
		);
		$imageContents = ob_get_contents();
		//Save graph image
		$fp = @fopen("picture".$count.".png" , "w");
		@fwrite($fp , $imageContents);
		@fclose($fp);
		ob_end_clean();
		$count++;
	}
}



do you know how we can fetch other objects from XLS like 'MS Word' ?

Viewing all articles
Browse latest Browse all 2707

Trending Articles



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