dsr Posted April 10, 2013 Share Posted April 10, 2013 Hi all This is DSR(PHP novice) from India and i am stuk in a probelm.. Is it possible to export images from folder to excel file using php? if possible then please show me the way. Regards DSR (I am a little bit confushed about posting in the right place) Link to comment https://forums.phpfreaks.com/topic/276777-export-images-from-folder-to-excel-file-using-php/ Share on other sites More sharing options...
Jessica Posted April 10, 2013 Share Posted April 10, 2013 Did you bother searching google? I found an answer in less than 1 minute. Link to comment https://forums.phpfreaks.com/topic/276777-export-images-from-folder-to-excel-file-using-php/#findComment-1423944 Share on other sites More sharing options...
liveproject101 Posted April 11, 2013 Share Posted April 11, 2013 You may use following code to insert image in Excel with the help of Php: $fileType = 'Excel2007'; $fileName = 'test.xlsx'; // Load the workbook $objPHPExcelReader = PHPExcel_IOFactory::createReader($fileType); $objPHPExcel = $objPHPExcelReader->load($fileName); // Add an image to the worksheet $objDrawing = new PHPExcel_Worksheet_Drawing(); $objDrawing->setName('My Image'); $objDrawing->setDescription('The Image that I am inserting'); $objDrawing->setPath('./images/myImage.png'); $objDrawing->setCoordinates('B2'); $objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); // Save the workbook $objPHPExcelWriter = PHPExcel_IOFactory::createWriter($objPHPExcel,$fileType); $objPHPExcelWriter->save($fileName); Link to comment https://forums.phpfreaks.com/topic/276777-export-images-from-folder-to-excel-file-using-php/#findComment-1424098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.