Page 1 of 1

generate spreadsheet

Posted: Wed Mar 01, 2006 5:27 am
by Dark_AngeL
Hi

Is it possible that when the user clicks on the button an excel spreadsheet gets generated with the details in the form?

Posted: Wed Mar 01, 2006 8:43 am
by feyd
Explain some more.

PHP can generate a spreadsheet, but nothing sitting client-side will other than the user choosing in their own browser menus..

Posted: Wed Mar 01, 2006 10:50 am
by jayshields
Yeah, PHP could generate a .csv file and then send it to the user for download.

I don't really know alot about csv (comma seperated value) files, but I imagine you could just have PHP create a file on the fly and build a spreadsheet in the csv format and then send it to the user using header().

On a side note, it wouldn't suprise me if there is a csv generator class out there somewhere. Have a look around hotscripts.com, google, etc.

Posted: Sun Mar 05, 2006 1:29 am
by Dark_AngeL
I have a form with information
I want the user to click on a button which will automatically generate a spreadsheet!

Posted: Sun Mar 05, 2006 1:35 am
by feyd
look for the Spreadsheet_Excel_Writer library on pear.php.net

Posted: Sun Mar 05, 2006 5:40 am
by Dark_AngeL
isnt there i code i can write?

Posted: Sun Mar 05, 2006 9:56 am
by feyd
If you want to write Excel spreadsheets, not really. The library I referenced is fairly complex to write in a short time. I'm not saying it can't be done, but quite improbable.