<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
<HTML>
<HEAD>
<META http-equiv = Content-Type content = "text/html; charset = UTF-8">
<TITLE> open an Excel table </TITLE>
</HEAD>
<BODY>
<Input name = "shanghai" type = "button" class = "but" id = "shanghai" onClick = "StartExcel ('shanghai')" value = "shanghai store">
<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 -{strfilename}.xls";
OExcel. Workbooks. Open (strAllName );
// OExcel. Workbooks. Open ("file: // ep-hgh/Top30 sales control table/top30 -shanghai.xls");
OExcel. DisplayAlerts = false;
OExcel. Visible = true;
// OExcel. Quit ();
// OExcel = null;
// The key to preventing the death of EExcel !! Required !!! Severe downmoon statement
IdTmr = window. setInterval ("Cleanup ();", 1000 );
}
Function Cleanup (){
Window. clearInterval (idTmr );
CollectGarbage ();
}
</SCRIPT>
</BODY>
</HTML>