PHP SimpleXLX无法读取excel(.xlsx)文件

PHP SimpleXLX无法读取excel(.xlsx)文件,php,phpexcel,Php,Phpexcel,无法读取使用生成的excel文件 XLSXWriter的代码: header('Content-Disposition: attachment; filename="'.XLSXWriter::sanitize_filename($file_name).'"'); header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8'); header("C

无法读取使用生成的excel文件

XLSXWriter的代码:

header('Content-Disposition: attachment; filename="'.XLSXWriter::sanitize_filename($file_name).'"');
header('Content-Type:   application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8');
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
header("Cache-Control: private",false);

$writer = new XLSXWriter();

$writer->writeToFile(DIR_EXCEL . $file_name) //file path in bracket
可以读取手动生成的Excel(.xlsx)文件


需要在SimpleXLSX.php文件中添加这些行

const SCHEMA_REL_RELATIONSHIP  =  'http://schemas.openxmlformats.org/package/2006/relationships';
const SCHEMA_REL_OFFICEDOCUMENT_RELATIONSHIP = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships';
const SCHEMA_REL_WORKSHEETRELATION =  'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet';