Open Excel (downmoon original) by calling Javascript in IE)
Keywords
: Javascript calls exc
<!
Doctype HTML public "-// W3C // dtd html 4.0 transitional // en"
>
<
Html
>
<
Head
>
<
Meta
HTTP-equiv
= Content-Type
Content
= "Text/html; charsets = UTF-8"
>
<
Title
>
Top 30 sales control table
</
Title
>
</
Head
>
<
Body
>
<
Input
Name
= "Shanghai"
Type
= "Button"
Class
= ""
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 sales control table for renewal-
"
+
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 eexcel dead processes !! Required !!! Severe downmoon statement
Idtmr
=
Window. setinterval (
"
Cleanup ();
"
,
1000
);
}
Function
Cleanup ()
...
{
Window. clearinterval (idtmr );
Collectgarbage ();
}
</
Script
>
</
Body
>
</
Html
>