Open Excel (downmoon original) by calling Javascript in IE)

Source: Internet
Author: User
Open Excel (downmoon original) by calling Javascript in IE)

Keywords: Javascript calls Excel

<! 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 List \ top30 sales control list for investment extension- " + 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 >

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.