Html form to excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chuck Stroup
    New Member
    • Aug 2010
    • 6

    #1

    Html form to excel

    I have this html form (below) and need it to send to an excel file. I started with PHP (hence the form action), but am having some serious issues making it work. I wondered if anyone knew how (or could help me find out how) to do this with ASP.

    I am self taught (translation: copy, paste, modify, and read a lot), and need this to work for our internal site.

    Someone please help.


    Code:
    <form action="craPOST.php" method="POST" enctype="multipart/form-data" name="cra" id="cra"> 
      <label><b>Employee Name</b><br /> 
      <select name="Name" id="Name"> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    <option>Employee Name</option> 
    </select> 
      </label> 
      <br /><br /> 
      
      <label><b>Location</b><br /> 
      <select name="Location" id="Location"> 
    <option>Cape Coral (North)</option> 
    <option>Cape Coral (South)</option> 
    <option>Fort Myers</option> 
    <option>Golden Gate</option> 
    <option>Immokalee</option> 
    <option>Labelle</option> 
    <option>Lehigh</option> 
    <option>Naples</option> 
    <option>Port Charlotte</option> 
    <option>Punta Gorda</option> 
    </select> 
      </label> 
      <br /><br /> 
      
      <label><b>Organization</b><br /> 
      <select name="Organization" id="Organization"> 
    <option>Organization 1</option> 
    <option>Organization 1</option> 
    <option>Organization 1</option> 
    <option>Organization 1</option> 
    <option>Organization 1</option> 
    <option>Other (please specify in description)</option> 
    </select> 
      </label> 
      <br /><br />   
      
      <label><b>Affliation</b><br /> 
      <select name="Affiliation" id="Affiliation"> 
    <option>Volunteer</option> 
    <option>Member</option> 
    <option>Board Member</option> 
    </select> 
      </label> 
      <p><br /> 
          <br /> 
      
          <b>Hours Donated</b><br /> 
          <input name="Hours" type="text" maxlength="5" /> 
        <br /> 
        <br /> 
      
          <b>Description of Service</b><br /> 
          <textarea name="Description" cols="40" rows="5"></textarea> 
    </p> 
      <p> 
        <label> 
        <input type="submit" name="submit" id="submit" value="Submit" /> 
        </label> 
    </p> 
    </form>
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    I assume you are using your excel file as a simple db table - so I would use an adodb connection (use the microsoft jet DB engine) and add records using the standard adodb.recordset .add() function.

    Jared

    Comment

    • Chuck Stroup
      New Member
      • Aug 2010
      • 6

      #3
      You just spoke Greek to me... sorry I am really new to this.

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        1- is your excell sheet in the form of:
        header header header header
        data data data data
        data data data data
        etc? If so, you have set it up like a database. The easiest way to work with a db in ASP is to use a built-in component called "adodb". Here is a useful tutorial.

        Jared

        Comment

        • Chuck Stroup
          New Member
          • Aug 2010
          • 6

          #5
          thanks I will try that.

          Comment

          Working...