generate spreadsheet

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Dark_AngeL
Forum Commoner
Posts: 39
Joined: Tue Feb 21, 2006 5:16 am

generate spreadsheet

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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..
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post 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.
Dark_AngeL
Forum Commoner
Posts: 39
Joined: Tue Feb 21, 2006 5:16 am

Post by Dark_AngeL »

I have a form with information
I want the user to click on a button which will automatically generate a spreadsheet!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

look for the Spreadsheet_Excel_Writer library on pear.php.net
Dark_AngeL
Forum Commoner
Posts: 39
Joined: Tue Feb 21, 2006 5:16 am

Post by Dark_AngeL »

isnt there i code i can write?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply