title: HTML javascript Dropdownlist populated from excel
body: <p>What I am trying to do is to populate an html dropdown list with values from an excel file. I also need it coded to where it will look in the first field for a value from one dropdown box and then populate another dropdown box.</p>
  
  <p>The excel file will have a list of names which I have coded into the HTML, but this list changes. So I need a way to pull the information from the excel file. The first row will not be displayed in the HTML file as this will be coded into the web page.</p>
  
  <p>Excel file</p>
  
  <p>County     City<br>
  Davidson   Antioch<br>
  Davidson   Nashville<br>
  Rutherford Smyrna</p>
  
  <p>When someone selects the county Davidson from the html form i want it to show the davidson cities in the other dropdown box for them to select. The code I have been using to achieve this without excel is as follows:</p>
  
  <pre><code>&lt;htmL&gt;
  &lt;title&gt;
  &lt;/title&gt;
  
  
  
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
  
  
  function configureDropDownLists(county,city) {
          var Davidson = new Array('', 'Antioch', 'Nashville');
          var Rutherford = new Array('', 'Smyrna', 'LaVergne');
  
          switch (county.value) {
                   case 'Davidson':
                         document.getElementById(city).options.length = 0;
                         for (i = 0; i &lt; Davidson.length; i++) {
                         createOption(document.getElementById(city), Davidson[i], Davidson[i]);
                  }
                  break;
              case 'Rutherford':
                  document.getElementById(city).options.length = 0; 
              for (i = 0; i &lt; Rutherford.length; i++) {
                  createOption(document.getElementById(city), Rutherford[i], Rutherford[i]);
                  }
                  break;
          }
  
      }
  
   function createOption(county, text, value) {
          var opt = document.createElement('option');
          opt.value = value;
          opt.text = text;
          county.options.add(opt);
      }
  &lt;/script&gt;
  &lt;tr&gt;
  &lt;td&gt;County Name: &lt;/td&gt;
  &lt;td&gt;&lt;select id="county" onchange="configureDropDownLists(this,'city');"&gt;
  &lt;option value=""&gt;&lt;/option&gt;
  &lt;option value="Davidson"&gt;Davidson&lt;/option&gt;
  &lt;option value="Rutherford"&gt;Rutherford&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;
  &lt;/tr&gt;&lt;br&gt;
  &lt;tr&gt;
  &lt;td&gt;City: &lt;/td&gt;
  &lt;td&gt;&lt;select id="city"&gt;
  &lt;/select&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am not sure how to get the data from my excel sheet to do the same as I need the first column to be searched and the second column to be displayed with javascript, activeX, or any other coding language that can do the trick in a web page. The excel file will be located on a shared drive along with the web page in the same directory.</p>