PHPExcel XLSM file with macros

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 16:16:46

问题


Is it possible to read and write xlsm with macros file with phpexcel?

I tested this code just to replicate the original file:

$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("file1.xlsm"); 
echo ('Saving...');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('test.xlsm');
header('Cache-Control: max-age=0');

But the new file is different from the original because he has no images.

Thank you.


回答1:


PHPExcel doesnot support XLSM fully. Try converting XLSM to XLSX file



来源:https://stackoverflow.com/questions/29231309/phpexcel-xlsm-file-with-macros

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!