Hello,
What is the best method to export large number of records into an excel file?
I'm having problem with my current script, it export records to an excel file using spreadsheet writer of pear.
Many Thanks!
Exporting large records to excel
Moderator: General Moderators
Re: Exporting large records to excel
I would suggest using CSV as a format, since excel has no trouble reading it and it is very simple to do with php.
http://us3.php.net/fgetcsv
Another, less known option, is to write a simple HTML file with actual HTML tables, which can be imported by Excel just fine.
http://us3.php.net/fgetcsv
Another, less known option, is to write a simple HTML file with actual HTML tables, which can be imported by Excel just fine.
Re: Exporting large records to excel
What was the problem with the PEAR excel writer?
There's an excellent tutorial at http://devzone.zend.com/article/3336-Re ... s-with-PHP
There's an excellent tutorial at http://devzone.zend.com/article/3336-Re ... s-with-PHP
Re: Exporting large records to excel
I second the CSV option. Easy to use with PHP, and easy to import to excel, or any other spreadsheet, for that matter.
Re: Exporting large records to excel
There are some issues with Excel when importing CSV file with utf-8 charset. I couldn't find a way to tell Excel that the charset is utf-8.
There are 10 types of people in this world, those who understand binary and those who don't
- jlising
- Forum Commoner
- Posts: 33
- Joined: Mon Mar 19, 2007 1:48 am
- Location: Pampanga, Philippines
- Contact:
Re: Exporting large records to excel
Thanks guys for your replies.
I can now export records using the spread sheet excel writer. One more problem is, when I export records containing special characters. Some characters (i.e. ñ, Ñ) are not properly interpreted.
Do you know how to solve this problem?
Regards,
Jess
I can now export records using the spread sheet excel writer. One more problem is, when I export records containing special characters. Some characters (i.e. ñ, Ñ) are not properly interpreted.
Do you know how to solve this problem?
Regards,
Jess