Results 1 to 7 of 7

Thread: send details from form to spreadsheet/excel document

  1. #1
    Join Date
    May 2008

    Question send details from form to spreadsheet/excel document

    i want to create a form that once summited sends the details to a spreadsheet, is this possible? if so how would i go about doing it?

  2. #2
    Join Date
    Dec 2005
    Not directly.

    You can create a 'comma' separated text file and send it with the form submission. I have used a 'FormMail' cgi program to post the information.

    Then read that file into the spreadsheet with the open or import buttons.

  3. #3
    Join Date
    Jan 2013
    Castle Rock, CO
    Cool, but how do I create the comma separated text file. I am an old (71) neophyte at this part of web site work. I have functioning forms that work and send me the form input. I also understand how to put CST text into a spreadsheet (Excel). But.....

  4. #4
    Join Date
    Dec 2005


    It would be easier to provide an answer if you could provide some example data from which you want to create the file.

    Lacking that, you might want to look at some of these sites: http://search.yahoo.com/search?fr=mc...ile+javascript

  5. #5
    Join Date
    Dec 2005


    A very simple example of the input and creation of a CSV file is as follows.
    You would need to copy and past the output of the script to a NotePad or WordPad (or similar) application
    so you could save the information for the Excel file to read.

    <!DOCTYPE html>
    <html lang="en">
    <meta charset="utf-8" />
    <title> Untitled </title>
    <script type="text/javascript">
    <style type="text/css">
    #entryForm { list-style-type: none; }
    <ul id="entryForm">
     <li> <input type="text" value="" name="info"> Firstname </li>
     <li> <input type="text" value="" name="info"> Middlename </li>
     <li> <input type="text" value="" name="info"> Lastname </li>
     <li> <input type="text" value="" name="info"> State </li>
     <li> <input type="text" value="" name="info"> Phone </li>
    <br><input type="button" value="Clear inputs" onclick="clearEntry('entryForm')">
     <input type="button" value="Create records" onclick="createRecord('entryForm','CSVinfo')">
     <input type="button" value="Clear records" onclick="document.getElementById('CSVinfo').value=''">
    <p><textarea id="CSVinfo" rows="10" cols="70"></textarea>
    <script type="text/javascript">
    function clearEntry(IDS) {
      var sel = document.getElementById(IDS).getElementsByTagName('input');
      for (var i=0; i<sel.length; i++) { sel[i].value = ''; }
    function createRecord(entryInfo,outputInfo) {
      var tarr = [];
      var sel = document.getElementById(entryInfo).getElementsByTagName('input');
      for (var i=0; i<sel.length; i++) { tarr.push(sel[i].value); }
      document.getElementById(outputInfo).value += '"'+tarr.join('","')+'"\n';  // could also use ";" as separator
    Last edited by JMRKER; 01-19-2013 at 09:15 PM.

  6. #6
    Join Date
    Jan 2013
    Castle Rock, CO

    Code requested

    Here is the code I am using for one of the forms that I am trying to transfer to a spreadsheet.
    <body style="background-color: #CCCCCC">

    <p><img alt="" height="54" src="images/pic-volunteer.jpg" width="259" />
    <span class="auto-style2"><strong>MILITARY VETERANS EMPLOYMENT
    <hr class="auto-style1" style="height: 5px" />
    <p class="auto-style2">Please fill out the following form. Items marked with an
    asterisk (*) are required.</p>
    <form action="/gdform.php" method="post" name="Survey">
    <input type="hidden" name="redirect" value="thank_you.html" />
    <span class="auto-style2"><strong><span class="auto-style3">
    Volunteer Submission Form</span></strong><br />
    <br />
    *First Name:
    <input name="A_FNAME" style="width: 225px" type="text" />&nbsp;
    *Last Name:
    <input name="B_LNAME" style="width: 225px" type="text" /><br />
    <br />
    *Phone Number: <input name="C_PHONENO" type="text" />&nbsp; Email:
    <input name="D_EMAIL" style="width: 410px" type="text" /><br />
    <br />
    I would like to volunteer for the following area(s): (Please
    check all that apply.)<br />
    <br />
    <input name="E_GREETER" type="checkbox" value="Yes" /> Greeter&nbsp;
    <input name="F_REGISTRATION" type="checkbox" value="Yes" />
    Onsite Registration&nbsp;
    <input name="G_PARKING" type="checkbox" value="Yes" /> Parking&nbsp;
    <input name="H_SECURITY" type="checkbox" value="Yes" /> Security&nbsp;
    <input name="I_RESUME_MENTOR" type="checkbox" value="Yes" /> Resume Mentor
    &amp; HR Support<br />
    <br />
    <input name="J_HUMAN_RESOURCES" type="checkbox" value="Yes" />
    Classroom Proctor&nbsp;
    <input name="K_DATABASE_INPUT" type="checkbox" value="Yes" />
    Database Input&nbsp;
    <input name="L_FACILITY_GUIDE" type="checkbox" value="Yes" /> Facility
    <input name="M_HELP_AS_NEEDED" type="checkbox" value="Yes" />
    Help as needed<br />
    <br />
    I am available: (Please check all that apply.)<br />
    <br />
    <input name="N_DAY1" type="checkbox" value="Yes" /> 1st day&nbsp;
    <input name="O_FIRST_SHIFT" type="checkbox" value="Yes" /> 7:00am - 11:00am&nbsp;
    <input name="P_SECOND_SHIFT" type="checkbox" value="Yes" /> 10:00am - 2:00pm&nbsp;
    <input name="Q_THIRD_SHIFT" type="checkbox" value="Yes" /> 1:00pm - 5:00pm<br />
    <input name="R_DAY2" type="checkbox" value="Yes" /> 2nd day&nbsp;
    <input name="S_2FIRST_SHIFT" type="checkbox" value="Yes" /> 7:00am - 11:00am&nbsp;
    <input name="T_2SECOND_SHIFT" type="checkbox" value="Yes" /> 10:00am - 2:00pm&nbsp;
    <input name="U_2THIRD_SHIFT" type="checkbox" value="Yes" /> 1:00pm - 5:00pm<br />
    <input name="V_DAY3" type="checkbox" value="Yes" /> 3rd day&nbsp;
    <input name="W_2FIRST_SHIFT" type="checkbox" value="Yes" /> 7:00am - 11:00am&nbsp;
    <input name="X_2SECOND_SHIFT" type="checkbox" value="Yes" /> 10:00am - 2:00pm&nbsp;
    <input name="Y_2THIRD_SHIFT" type="checkbox" value="Yes" /> 1:00pm - 5:00pm<br />
    <br />
    Special Qualifications:<br />
    <textarea name="Z_QUALIFICATIONS" style="width: 833px; height: 100px"></textarea><br />
    <br />
    Comments:<br />
    <textarea name="_1_COMMENTS" style="width: 833px; height: 100px"></textarea><br />
    </span><br />
    <input name="_3_Submit1" type="submit" value="Submit" />&nbsp;
    <input name="Reset1" type="reset" value="Reset" /><br />
    &nbsp;<span class="auto-style2">Thank you for volunteering!
    <input name="AA_Volunteer Form" type="hidden" value="Submission" />

  7. #7
    Join Date
    Dec 2005
    Did you try to put any of the JS I suggested into your last attempt?

    Did you test the example I provided to see if it meets any of your needs?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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