dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Get text from excel using Javascript

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    7

    Get text from excel using Javascript

    Hallo all users from Webdeveloper.com,

    I am new with Javascript and i am stock with this code:

    <script language=javascript>
    function GetData(cell,row){
    var excel = new ActiveXObject("Excel.Application");
    var excel_file = excel.Workbooks.Open(data/data.xls);
    var excel_sheet = excel.Worksheets("Sheet1");
    var data = excel_sheet.Cells(cell,row).Value;
    document.getElementById('Data').innerText =data;
    }

    </script>

    <center>

    <div id="Data">Information</div>

    <input type="button" value="cell(1),row(1)" onClick="GetData(1,1);" />
    <input type="button" value="cell(1),row(2)" onClick="GetData(1,2);" />
    <input type="button" value="cell(2),row(1)" onClick="GetData(2,1);" />
    <input type="button" value="cell(2),row(2)" onClick="GetData(2,2);" />

    </center>

    Is there someone who knows this code, and know what I'm doing wrong.
    The path would be wrong, or I miss the link to the excel doc.

    Advance many thanks.

  2. #2
    Join Date
    Mar 2013
    Posts
    7
    O my website is graficmedia.nl
    Hier you can see the code.

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



Recent Articles