我试图使用javascript从excel获取数据,但我的GetFata(cell, row)
函数无效!请帮忙
这是代码:
<script language="javascript" >
function GetData(cell,row){
var excel = new ActiveXObject("Excel.Application");
var excel_file = excel.Workbooks.Open("C://sample.xlsx");
var excel_sheet = excel.Worksheets("sheet1");
var data = excel_sheet.Cells(cell,row).Value;
document.getElementById('div1').innerText =data;
}
</script>
...
...
<input type="button" value="cell(1),row(1)" onClick="GetData(1,1);" />