jsp页面导出成word,excel
来源:互联网 发布:淘宝买大麻种子犯法吗 编辑:程序博客网 时间:2024/05/22 09:01
1.word
var word = new ActiveXObject("Word.Application");
var curTbl = document.getElementById("tabid");
var doc = word.Documents.Add("",0,1);//不打开模版直接加入内容
var Range=doc.Range(0,1);
var sel = document.body.createTextRange();
sel.moveToElementText(curTbl);//
sel.select();
sel.execCommand("Copy");
Range.Paste();
word.Application.Visible = true;
2.excel
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(RS);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oXL.Visible = true;
idTmr = window.setInterval("Cleanup();",1);
alert("Successful Output To Excel!");
var word = new ActiveXObject("Word.Application");
var curTbl = document.getElementById("tabid");
var doc = word.Documents.Add("",0,1);//不打开模版直接加入内容
var Range=doc.Range(0,1);
var sel = document.body.createTextRange();
sel.moveToElementText(curTbl);//
sel.select();
sel.execCommand("Copy");
Range.Paste();
word.Application.Visible = true;
2.excel
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(RS);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oXL.Visible = true;
idTmr = window.setInterval("Cleanup();",1);
alert("Successful Output To Excel!");
//clear taskmgr
function Cleanup(){
window.clearInterval(idTmr);
CollectGarbage();//用于浏览器清除垃圾,释放缓存
}
- jsp页面导出成word,excel
- jsp做页面导出成word文件和excel文件
- jsp做页面导出成word文件和excel文件
- jsp 导出 word excel
- jsp jquery 在页面中 导出EXCEL和WORD
- jsp页面数据导出到excel和word
- jsp页面导出成word文件
- jsp页面导出excel
- jsp打印,导出word/excel
- JSP导出到excel,word
- Java JSP页面导出Excel
- jsp页面导出excel表格
- 简单的jsp导出excel/word
- 使用jsp导出excel或word
- 页面导出到Excel、Word、txt
- WEB页面导出为EXCEL,Word
- jsp页面中导出word文档
- jsp页面导出成excel(局限于Chrome和FireFox)
- 第三讲 HTML5 视频播放事件属性及自己做的一个简单的html5的视频
- Google Maps API V3 的叠加层
- SQL行列轉換方法
- "The connection to adb is down, and a severe error has occured."错误总结
- 宣布发布全新的 Windows Azure 缓存预览版
- jsp页面导出成word,excel
- 使用profiles概要文件控制用户资源
- 最长上升子序列
- linux container_of(ptr, type, member)
- 使用XFire+Spring构建Web Service
- 单链表反转分析
- C# 计算中文汉字笔画数
- mac os平台编译jaberd
- jdk时间差问题