Hallo all users from Webdeveloper.com,
I am new with Javascript and i am stock with this code:
[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.