我有以下代码用于在javascript中读取 excel :
<html>
<head>
<script type="text/javascript">
function readData(x,y)
{
var excel = new ActiveXObject("Excel.Application");
alert(excel);
var excel_file = excel.Workbooks.Open("D:\File1.xlsx");
Excel.Visible = true;
alert(excel_file);
var excel_sheet = excel_file.Worksheets("DEPT INC UPDATE");
alert(excel_sheet);
var data = excel_sheet.Cells(x,y).Value;
alert(data);
return data;
}
</script>
</head>
<body>
<input type="button" value="SimpleButton" onclick="readData(2,3);" />
</body>
</html>
但是不知道哪里出错了??