- 1、本文档共17页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
web页面导出为excel文档的方法(The method of exporting web pages to EXCEL documents).doc
web页面导出为excel文档的方法(The method of exporting web pages to EXCEL documents)
The method of exporting WEB pages to EXCEL documents (JS implementation and collation)
DOCTYPE HTML PUBLIC, -//W3C//DTD XHTML 1 Transitional//EN, /TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns= /1999/xhtml
head
meta http-equiv= Content-Type content= text/html; charset=gb2312 /
Method of exporting titleWEB pages to EXCEL documents /title
/head
body
table id=, tableExcel, width=, 60%, border=, 1, cellspacing=, cellpadding=, 0, 0
tr
tdyufei welcome you, /td
/tr
/table
input type= button onclick= javascript:method1 (tableExcel); value= import the first method to EXCEL
input type= button onclick= javascript:method2 (tableExcel); value= import second methods to EXCEL
input type= button onclick= javascript:getXlsFromTbl (tableExcel, null); value= import third methods to EXCEL
SCRIPT LANGUAGE= JavaScript
/ / the entire table to copy in EXCEL
Function method1 (tableid) {
Var curTbl = document.getElementById (tableid);
Var oXL = new ActiveXObject (Excel.Application); / / create a AX object Excel
Var = oXL.Workbooks.Add (oWB); / / get the workbook object
Var oSheet = oWB.ActiveSheet; / / sheet activated current
Var sel = document.body.createTextRange ();
Sel.moveToElementText (curTbl); / / put the contents of the table to TextRange
Sel.select (TextRange); / / select content
Sel.execCommand (Copy); / / copy content in TextRange
(oSheet.Paste); / / paste to the activities of EXCEL
Var XLObj = new ActiveXObject (Excel.Application);
Var xlBook = XLObj.Workbooks.Add; / / new workbook
Var ExcelSheet = xlBook.Worksheets (1); / / create a work table
2. save the form
ExcelSheet.SaveAs (C:\\TEST.XLS);
3. make Excel visible through Application objects
ExcelSheet.Application.Visible = true;
4. printing
XlBook.PrintOut;
Or:
ExcelSheet.PrintOut;
5. close
XlBook.Close (savechanges=false);
Or:
ExcelSheet.Close (savechanges=false);
6. end process
ExcelSheet.Application.Quit ();
Or:
XLObj.Quit ();
XLObj=null;
7.
您可能关注的文档
- urkit全国各地基准地价汇总.doc
- 第二卷D.堆料取料堆取料机基础土建工程.doc
- 渠道谈九-可口可乐新渠道开发宝典(Talk about channels nine - Coca-Cola new channel development collection).doc
- 高三英语核心词汇复习共课时.doc
- 《波斯王子王者无双》攻略及对应表.docx
- 基于iec的数字化变电站远动方案探讨(Discussion on Telecontrol scheme of digital substation based on IEC).doc
- 西方音乐史与作品欣赏题库.doc
- 尚阳小区#楼施工组织设计.doc
- 西方经济学(宏观部分)第五版_—章_课后习题答案高鸿业.doc
- JGJ -龙门架及井架物料提升机安全技术规范.doc
- 期末全真测试卷(教科版)六年级科学下册.docx
- Unit3Healthyorunhealthy?(课件)沪教牛津版(深圳用)英语六年级上册.pptx
- 农业现代化与农村地理(1).pptx
- 农业工程与农业机械技术教学总结.pptx
- Module9Unit3Languageinuse课件英语八年级下册.pptx
- 安徽省黄山市八年级下学期期末考试英语试题(原卷版).docx
- xx关于劳动节的演讲稿字篇范文.pptx
- Module4写作能力提升练英语八年级下册(1).pptx
- Unit1NatureinthebalanceIntegratedskills课件高中英语译林版.pptx
- Unit2WildlifeProtection单词记忆课件高中英语人教版.pptx
文档评论(0)