JavaScript打开EXCEL后,最后释放进程的方法
2008-11-14 20:02:50 来源:WEB开发网核心提示:var idTmr = ""; function Cleanup() { window.clearInterval(idTmr); CollectGarbage(); } function AutomateExcel() { var oXL = new ActiveXObject("Exc
var idTmr = "";
function Cleanup() {
window.clearInterval(idTmr);
CollectGarbage();
}
function AutomateExcel()
{
var oXL = new ActiveXObject("Excel.application");
oXL.DisplayAlerts = false
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
oXL.Visible = true;
oXL.UserControl = false;
oXL = null;
idTmr = window.setInterval("Cleanup();",1);
}
function Cleanup() {
window.clearInterval(idTmr);
CollectGarbage();
}
function AutomateExcel()
{
var oXL = new ActiveXObject("Excel.application");
oXL.DisplayAlerts = false
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
oXL.Visible = true;
oXL.UserControl = false;
oXL = null;
idTmr = window.setInterval("Cleanup();",1);
}
Tags:JavaScript 打开 EXCEL
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接