导出的Excel2003文件报“无法读取的内容”错误怎么解决?
上图是Excel模板
代码如下
require_once 'lib/phpexcel/Classes/PHPExcel.php';
$dirfile = dirname(__FILE__);
$inputFileType = 'Excel5';
$inputFileName = $dirfile.'/lib/phpexcel/templates/Excel.xls';
$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
//生成文件
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
加载此模板后,生成的新文件,出现如题的错误