PDA

View Full Version : Input data into web form write to Excel



austenr
04-12-2007, 06:01 AM
I have to come up with a way to make an ASP page with a form in it write the information to an Excel Sheet. Does anyone have any suggestion as to where to look for resources? Thanks

lucas
04-12-2007, 08:43 AM
This is fairly easy if its not a password protected page and especially if the form or data is in a table...

this kb entry access a table on a .php page which is poor folks asp.....
http://vbaexpress.com/kb/getarticle.php?kb_id=576

austenr
04-12-2007, 09:45 AM
Hi thanks Lucas. I guess the main question now is how do you use PHP to collect the entries in a table in the HTML?

lucas
04-12-2007, 09:57 AM
I guess I'm not following you....with php you can have php code interlaced with your regular html....unlike perl, etc. so if the data is in a table you should have no trouble getting it....

austenr
04-12-2007, 10:01 AM
Perhaps I did not explain myself clearly. I want a simple form on a web page that you can enter data into the fields and then have it populate it into an excel sheet with one row per form submission. I am thinking about something like ths:

First name
Last Name
City
State
Zip code

These would be my fields on the html form. When the user hits submit, the excel workbook gets populated with that data on one row.

lucas
04-12-2007, 10:10 AM
Hi austenr,
I think your php or asp code will save the submitted data to either a txt file or an html file...you can then retrieve it from there. Look at the code to see if it's storing the data in a txt file database or emailing it to you when someone submits the form.

Do you have the code your using for the form that you could post?

might even be an sql database...?

austenr
04-12-2007, 10:17 AM
Really I dont know anything about PHP or ASP. This is a work assigment I was given. The simpiler the better. I can do basic HTML but nothing near that fancy. Was hoping for a resource where I could see a sample and figure it out on my own.

lucas
04-12-2007, 11:07 AM
Here is a start for you.....simple textfile database. no sql required although asp and php are set up to use sql if you have it available. Your provider must have php on the server to run this scipt.
http://www.scriptdungeon.com/script.php?ScriptID=3004

php isn't that hard and with a little research you will figure it out pretty quickly.

austenr
04-12-2007, 11:13 AM
Thanks. I will give it a go.

lucas
04-12-2007, 11:17 AM
Austenr,
Here is a link to another thread going on about query for the data once you get it to the textfile.
http://vbaexpress.com/forum/showthread.php?t=12175

Norie
04-12-2007, 11:34 AM
austen

Are you wanting to extract data from an existing webpage?

Or do you want to create a webpage?