PDA

View Full Version : PHP to Formatted Excel File


Pharos
07-16-2010, 11:40 PM
There is something I'm trying to do, but I'm not sure if it will be at all possible.

I have a flash/PHP order form on a website. When the visitor fills out the form and hits submit, I would like the PHP to create a formatted Excel file or to copy the form info into an existing formatted Excel file, then e-mail this Excel file to a dispatcher.

I would like the new document to be Excel because I would like the dispatcher to be able to add to or revise information on it, plus it is also very easy to read and looks like a professional form.

I'm at a loss as to whether this is possible.

I have created other forms that submit e-mails with PHP, but nothing as complicated as the above.

Any help would be appreciated.

Thank you.

snowedin
07-18-2010, 02:02 PM
This is a standard php task.
Google - php excel
I would not mail the excel file to a dispatcher.
I'd write the file to a directory and mail a link to the dispatcher.

sneakyimp
07-20-2010, 01:02 AM
Getting directly from PHP to Excel format is not something I've done. I've always chosen to create a comma-separated data file using fputcsv (http://us3.php.net/manual/en/function.fputcsv.php).