本文介绍了带有宏的PHPExcel XLSM文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用phpexcel读取和写入带有宏文件的xlsm?
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.
谢谢.
推荐答案
PHPExcel多年平均值支持XLSM充分.试图转换到XLSM XLSX文件
PHPExcel doesnot support XLSM fully. Try converting XLSM to XLSX file
这篇关于带有宏的PHPExcel XLSM文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!