Read xls file with JavaScript

Asked By 30 points N/A Posted on -
qa-featured

Hi Experts,

Please suggest me how can I read xls file with JavaScript. Please send melink of the tutorial for read xls file with JavaScript. Thanks.  

Regards,

Guy Blasi

SHARE
Answered By 10 points N/A #180970

Read xls file with JavaScript

qa-featured

Hello! Good Day!

Below is an example code on how to read an excel file in javascript:

function my_function(){

    var Excel;

    Excel = new ActiveXObject("Excel.Application");

    Excel.Visible = false;

    return Excel.Workbooks.Open("path of your file").ActiveSheet.Cells(l,i).Value;

}

var i=1;  // # of columns

var l=1; // # of rows

do

{

    a=my_function()

    if (a!=null)

    {

       document.write("value is " + a + "&nbsp ;&nbsp ;&nbsp ;&nbsp ;");

        i++;

    }

    else

    {

        l++;

        i=1;

        document.write("<br />");

    }

  b = my_function()

}while(a!=null || b!=null);

You can start from there.

Hope this helps!

Login/Register to Answer

Related Questions