title: How to extract multiple cells from an excel file using javascript on one function. (if possible)
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;
  Style Get data from excel sheet
  &lt;/title&gt;
  &lt;script language="javascript" &gt;
  function GetData(cell,row){
  var excel = new ActiveXObject("Excel.Application");
  var excel_file = excel.Workbooks.Open("I:test.xlsx");
  var excel_sheet = excel.Worksheets("Sheet1");
  var data = excel_sheet.Cells(cell,row).Value;
  document.getElementById('div1').innerText =data;
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;div style="background: #009955; width:'100%';" align="center"&gt;
  &lt;font color="#000080" size="12pt"&gt;
  &lt;b&gt;Get data from excel sheets&lt;/b&gt;
  &lt;/font&gt;
  &lt;/div&gt;
  &lt;center&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;div id="div1" style="background: #DFDFFF; width:'100%';" align="center"&gt;
  Click buttons to fetch data from F:\\test.xls
  &lt;/div&gt;
  &lt;input type="button" value="cell(1),row(1)" onClick="GetData(1,1);" /&gt;
  &lt;input type="button" value="cell(2),row(1)" onClick="GetData(1,2);" /&gt;
  &lt;input type="button" value="cell(1),row(2)" onClick="GetData(2,1);" /&gt;
  &lt;input type="button" value="cell(2),row(2)" onClick="GetData(2,2);" /&gt;
  &lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I've tried this several times and I'm afraid I cannot explain myself very well so I found this generic code from this site that does almost exactly what I need it to do. The only thing is that I need it to get multiple cells from an excel file "onclick". As you can see, its only getting it from i.e. (1,1) but how would I write it if I wanted all of them (1,1)(1,2)(2,1)(2,2) to be gathered with only one button or a href? I know this must be easy to you guys but I'm new at this. Two weeks new. So please, any help would be appreciated. :) (And I've tried to play with it changing code here and there, but nada.)</p>