mk-j / PHP_XLSXWriter

Lightweight XLSX Excel Spreadsheet Writer in PHP
MIT License
1.84k stars 665 forks source link

IIS corrupt file #329

Closed pomborenato closed 1 year ago

pomborenato commented 2 years ago

i'm using in IIS with PHP Version 5.2.8 and file generated not open in correct format.

alex-twbsd commented 1 year ago

I had same issue on FreeBSD+Apache. Just need to clear output buffer before sending the header:

// clear output buffer ob_end_clean();

header("Content-Type"........ ..... $writer->writeToStdOut(); .....

mk-j commented 1 year ago

If you can provide a short php program which reproduces the problem, then we can reproduce it and fix it. Otherwise there isn't enough information to reproduce and fix the reported issue.