Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

values from form to excel file??

Status
Not open for further replies.

axsom1

Technical User
Feb 27, 2001
67
0
0
US
I have a basic form and would like to write the values that a user inputs in the form to an excel file. Is this possible?? Anyone point me in the right direction??

Any help is greatly appreciated!

John
 
Assuming the user has Excel 97 or better installed:
Code:
'Set the contenttype to Excel
<%response.contenttype=&quot;application/vnd.ms-excel&quot;%>

'Display an HTML table and it will appear as an excel spreadsheet in the browser
<table>
<tr>
  <Td>Test</td><td>data</td>
</tr>
</table>
.
.. Eat, think and be merry .
... ....................... .
 
Are you having them enter data on a form which you want to capture in an Excel document? If so, you can automate Excel from within an ASP page to do just that. The Asp page would first capture and validate (if necessary) that data from the form, then would create an Excel object. Then you could make calls to the object - having it open a file or create a new one, creating worksheets, saving data to the cells, then closing the file.

There are other things you can do here to, like save the data to an actual database, then pull that data out into excel documents from there.

Does anyone know a Faq along these lines... the baby is crying... gotta go. -Chris Didion
Matrix Automation, MCP
 
Yeah, they will be putting their name, what class they plan on attending and any comments they have. I just wanted to plop that info in an excel spreadsheet rather than how its done now which is just output to a text file.

John
 
John,
If that is all you're going to do, then don't bother with the Excel object, just use Swany's answer. Set your content type to Excel, and then create an HTML table using your data from your database. It'll work just fine.

Harold Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
How does that help with storing the data? Doesn't it just output the spreadsheet in the browser? -Chris Didion
Matrix Automation, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top