Is there any other PHP components like PHPExcel?
php $file="demo. xls"; $test="<table ><tr><td>Cell 1</td><td>Cell 2</td></tr></table>"; header("Content-type: application/vnd. ms-excel"); header("Content-Disposition: attachment; filename=$file"); echo $test; ?>
You can type an apostrophe (') in front of the number, and Excel will treat it as text. So: echo '"' . $d['nom'] .
There is some class that generates PHP Excel files (real excel files, not that .csv thing). I use (DEPRICATED) See edit 2:
https://github.com/PHPOffice/PHPExcel
BUT: I have had a problem when trying to read these generated excel files with the java excel READER, so there might be bugs in this PHP script.
EDIT: Nice one: http://www.phpclasses.org/package/2037-PHP-Generate-spreadsheet-files-Excel-xls-XML-format.html
PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.). https://github.com/PHPOffice/PhpSpreadsheet
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With