How To Export To Excel With PHP
Computing : Learning PHP If you want to give people an export to Excel option in your PHP programs, then it can be really quite simple. What you need to do first is to ensure that all the content to be exported is comma separated. If it is data from a database then this is trivial to do - just run a loop through each relevant record or row in the database and comma separate. The trick then is that the first thing to be sent from the PHP program is the header showing that the item is an Excel file. Otherwise the comma separated list will just be dumped to the screen. Once you have the header in place, it's job done!
Questions about learn PHP:
|
|