Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<meta http-equiv=content-type content= "text/html; Charset=utf-8 ">
<TITLE>TOP30 pin Control Table </TITLE>
</HEAD>
<BODY>
<input name= "Shanghai" type= button "class=" but "id=" Shanghai "onclick=" Startexcel (' Shanghai ') "value=" Shanghai Shop >
<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 Sales Control Table \TOP30 Investment Renewal Sales Control Table-" +strfilename+ ". xls";
OExcel.Workbooks.Open (Strallname);
OExcel.Workbooks.Open ("FILE://EP-HGH/TOP30 pin-Control table/TOP30 Business Extension Sales Control Table-Shanghai. xls");
Oexcel.displayalerts = false;
oExcel.Visible = true;
oExcel.Quit ();
oexcel = null;
The key to prevent eexcel death process!! Have to!!! Downmoon Serious statement
IDTMR = Window.setinterval ("Cleanup ();", 1000);
}
function Cleanup () ... {
Window.clearinterval (IDTMR);
CollectGarbage ();
}
</SCRIPT>
</BODY>
</HTML>