Dear All,
I'm searching for a coding which can make me create xls file from a database fields and that the client can save the data in xls.
Thanks
Dilbert137
How can i create an xls file
Moderator: General Moderators
-
Dilbert137
- Forum Commoner
- Posts: 57
- Joined: Sat Jun 02, 2007 5:02 am
- Location: Mauritius
Re: How can i create an xls file
Not to say it's impossible, but it is far easier to export as a CSV, and import that into your spreadsheet of choice.
http://php.net/manual/en/function.fputcsv.php
http://php.net/manual/en/function.fputcsv.php
Re: How can i create an xls file
To make a file that Excel will open nativly (when you double click the file) simply seperate your data with a tab (ASCII 9) and then save the file with an XLS extension. It will not have any special formatting, but excel will happily open it.
Re: How can i create an xls file
You can use the PHPExcel library