...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

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!


Profile image!
By: Stephen

  More about learn PHP

  Reply to How To Export To Excel With PHP

  Receive Our Newsletter

  Send to friend

learn PHP picture



Questions about learn PHP:

Ask question

More Articles:
Money making ideas: computer training
Search engine performance: what to target
How to stop annoying keyboards