PHP_XLSXWriter icon indicating copy to clipboard operation
PHP_XLSXWriter copied to clipboard

Generated XLSX File from MIME-TYPE application/octet-stream

Open itsowi opened this issue 7 years ago • 1 comments

Hi guys, i wrote an excel (xlsx) export and use this library. For imports, i will check the mime type of every uploaded file. But the mime-type check of this xlsx file is from type application/octet-stream.

I have try it with some header information, but with the same result.

header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); header('Content-Transfer-Encoding: binary'); header('Cache-Control: must-revalidate'); header('Pragma: public');

I use PHP in Version 5.6.x.

$writer = new Efs_Xlsx_Writer(); $writer->setAuthor('Example author'); $writer->writeSheet($data, "Sheet name", $headers); $writer->writeToFile('myfile.xlsx');

itsowi avatar Feb 19 '18 08:02 itsowi

Just try to use: //$writer->writeToFile('myfile.xlsx'); $writer->writeToStdOut(); $writer->writeToString;

axxler avatar Jan 24 '20 16:01 axxler