Consulting

Results 1 to 11 of 11

Thread: Input data into web form write to Excel

  1. #1
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location

    Input data into web form write to Excel

    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

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    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?

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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....
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    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.

  6. #6
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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...?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  7. #7
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    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.

  8. #8
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  9. #9
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Thanks. I will give it a go.

  10. #10
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  11. #11
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    austen

    Are you wanting to extract data from an existing webpage?

    Or do you want to create a webpage?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •