<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN“>
<HTML>
<HEAD>
<META http-equiv=Content-Type content=“text/html; charset=utf-8“>
<TITLE>打开Excel表</TITLE>
</HEAD>
<BODY>
<input name=“shanghai“ type=“button“ class=“but“ id=“shanghai“ onClick=“StartExcel('上海')“ value=“上海店“>
<SCRIPT LANGUAGE=“Javascript“>
var idTmr = ““;
function StartExcel(strFileName)
{
var oExcel;
var oWorkbook;
var strAllName;
oExcel = new ActiveXObject(“Excel.Application“);
//if(strFileName=null || strFileName=““)
//{return;
//}
strAllName=“\\\\ep-hgh\\Top30销控表\\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);
}
function Cleanup() {
window.clearInterval(idTmr);
CollectGarbage();
}
</SCRIPT>
</BODY>
</HTML>
在 IE 中调用 javascript 打开 Excel 表
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@