0

该脚本工作正常,但它不断在任务管理器的“进程”部分创建一个新进程。不是应用程序,只是流程。我以为我正在使用 write 'quit' 选项,但显然不是!这是代码:

<script>

function gbid(s)    {
return document.getElementById(s);
}

function GetData(cell,row){
var excel = new ActiveXObject("Excel.Application");
var excel_file = excel.Workbooks.Open("44227.xls");
var excel_sheet = excel.Worksheets("sheet1");

gbid('span1').innerText = excel_sheet.Cells(93,1).Value;    
gbid('span2').innerText = excel_sheet.Cells(95,3).Value;    
gbid('span3').innerText = excel_sheet.Cells(94,4).Value;    
gbid('span4').innerText = excel_sheet.Cells(95,4).Value;
gbid('span5').innerText = excel_sheet.Cells(95,5).Value;


gbid('span6').innerText = excel_sheet.Cells(97,1).Value;
gbid('span7').innerText = excel_sheet.Cells(99,3).Value;
gbid('span8').innerText = excel_sheet.Cells(98,4).Value;
gbid('span9').innerText = excel_sheet.Cells(99,4).Value;
gbid('span10').innerText = excel_sheet.Cells(99,5).Value;

excel_file.Close();
excel.Application.Quit();
excel.Close();
}
</script>
<body onload="GetData();" />

其余的只是桌子,所以没什么大不了的。没有重要的代码或任何东西。如您所见,我尝试了三种不同类型的线条,我什至自己尝试过。纳达!我什至试过没有';' 在最后!我已经搜索了这个站点并使用了这些示例,但它只是无法正常工作!它将不断创建新流程!是不是因为我用了: new ActiveXObject("Excel.Application");

4

0 回答 0