zoukankan
html css js c++ java
在IE中调用javascript打开Excel
在IE中调用javascript打开Excel(downmoon原作)
关键词
: javascript调用excel
<!
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销控表
</
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
>
邀月注:本文版权由邀月和博客园共同所有,转载请注明出处。
助人等于自助!
3w@live.cn
查看全文
相关阅读:
hdu-1114
hdu2546
POJ-3126
POJ-1915
ZOJ-1709
Codeforces 847H
Codeforces 847C
Codeforces 847I
Codeforces 847E
算法笔记--矩阵及矩阵快速幂
原文地址:https://www.cnblogs.com/downmoon/p/1019661.html
最新文章
csuoj-1900 锋芒毕露
POJ2528---Mayor's posters
HDU-1698-----Just Hook
HDU-3577-------Fast Arrrangement
地兵布阵 -----------HDU-1166
POJ-3468 ---A Simple Problem with integers
HDU-1754 A
hdu-2222
Remember the Word (UVA-1402)
Trie模版
热门文章
ARTWORK
欧拉函数篇
欧拉函数篇
Exponial
NCPC 2016 Fleecing the Raffle
hdu-1711
POJ-2406 Power string
POJ-2752
KMP模版
hdu-1198
Copyright © 2011-2022 走看看