复制代码 代码如下:
varidTmr="";
functionStartExcel(strFileName)
...{
varoExcel;
varoWorkbook;
varstrAllName;
oExcel=newActiveXObject("Excel.Application");
//if(strFileName=null||strFileName="")
//{return;
//}
strAllName="ep-hghTop30销控表TOP30招商续约销控表-"+strFileName+".xls";
oExcel.Workbooks.Open(strAllName);
//oExcel.Workbooks.Open("file://ep-hgh/Top30销控表/TOP30招商续约销控表-上海.xls");
oExcel.DisplayAlerts=false;
oExcel.Visible=true;
//oExcel.Quit();
//oExcel=null;
//防EExcel死进程的关键!!必须!!!downmoon严重声明
idTmr=window.setInterval("Cleanup();",1000);
}
functionCleanup()...{
window.clearInterval(idTmr);
CollectGarbage();
}