posts - 710,  comments - 81,  views - 260万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  功能封装

windows文件属性操作 dsofile
摘要:dsofile.dll是com组件,.net程序中引用dsofile.dll文件后,程序集名称会变成“Interop.DSOFile.dll”, com组件需要用regsvr32注册,所以需要注册dsofile.dll程序集,注意不是注册"Interop.DSOFile.dll", Interop. 阅读全文
posted @ 2013-09-13 12:12 itprobie-菜鸟程序员 阅读(1695) 评论(0) 推荐(0) 编辑
动态添加行
摘要:动态添加行处理过程:前台将行间和行内的数据用分隔符隔开,然后在后台再用分隔函数提取数据。前台拼接字符串,需要将数据中存在的行间和行内的分隔符编码,后台再解码。 编码说明:"%":"%25" ",":"%2C" "|":"%7C",每条记录之间用"|"分隔,每条记录的值之间用","分隔,值中可能存在" 阅读全文
posted @ 2013-06-09 12:08 itprobie-菜鸟程序员 阅读(311) 评论(0) 推荐(0) 编辑
js 导出到excel
摘要:程序员的基础教程:菜鸟程序员 阅读全文
posted @ 2013-05-22 11:05 itprobie-菜鸟程序员 阅读(25538) 评论(0) 推荐(0) 编辑
js 导出到word,excel
摘要:1>js导出,原理:复制页面中的table,让后粘贴到excle中 程序员的基础教程:菜鸟程序员 阅读全文
posted @ 2013-05-21 10:22 itprobie-菜鸟程序员 阅读(2134) 评论(0) 推荐(0) 编辑
JS 操作Excel格式
摘要:JS 操作Excel格式 1>操作前注册FSO js操作excel用到了Scripting.FileSystemObject (FSO 文本文件读写),需要开启该功能,否则报错:automation 服务器不能创建对象, 在“运行”中执行regsvr32 scrrun.dll即可开启FSO. 2>设 阅读全文
posted @ 2013-05-21 09:50 itprobie-菜鸟程序员 阅读(9126) 评论(1) 推荐(0) 编辑
word、excel、ppt转换成pdf
摘要:word、excel、ppt转换成pdf,调用office的API,原理是调用的office的另存为pdf的命令,将文件保存为pdf格式的文件。 office必须是2007版本,office另存为pdf必须安装一个第三方的插件,excel转换成pdf要开启打印服务,下载地址SaveAsPDFandX 阅读全文
posted @ 2013-03-15 10:13 itprobie-菜鸟程序员 阅读(445) 评论(0) 推荐(0) 编辑
word、excel、ppt转换成html
摘要:将word、excel、ppt转换成html,调用office的API;转换后的html样式会丢失 注意:请设置web.config的system.web加点中添加一下配置,操作excel或word需要管理员的权限,否则报错“否则会提示检索 COM 类工厂中 CLSID 为 {000209FF-00 阅读全文
posted @ 2013-03-15 10:01 itprobie-菜鸟程序员 阅读(2705) 评论(0) 推荐(0) 编辑
使用NPOI实现excel的导入导出
摘要:NPOI2可以对excle2003和excle2007进行导入导出的操作 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 using System.IO; 阅读全文
posted @ 2012-09-18 17:49 itprobie-菜鸟程序员 阅读(20046) 评论(0) 推荐(2) 编辑
文件下载的四种方式
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 using System.IO; 7 8 /// 9 /// 文件下载有以下四种方式, 大文件下载的处理方法:将文件分块下载。 10 /// Response.OutputStream.Write 11 /// Response.TransmitFile 12 /// Response.WriteFile 13 /// Response.BinaryWrite 14 /// ... 阅读全文
posted @ 2012-09-18 17:45 itprobie-菜鸟程序员 阅读(1776) 评论(0) 推荐(0) 编辑
文件上传通用类
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 using System.IO; 7 using System.Web.UI.WebControls; 8 9 public class FileUploadHelper10 {11 private HttpPostedFile postedFile;12 13 public FileUploadHelper(HttpPostedFile postedFile)14 {15... 阅读全文
posted @ 2012-09-18 17:36 itprobie-菜鸟程序员 阅读(325) 评论(0) 推荐(0) 编辑
将html导入到excel或word
摘要:1>通过js实现,在页面的前台调用微软office的com组件,要求用户必须安装office,启动automation服务,并且在浏览器中启用未注册的activex选项.function importToExcel(tableid) { var curTbl = document.getElementById(tableid); try { var oXL = new ActiveXObject("Excel.Application"); } catch (e) { alert("请安装微软Excel并且在浏览器的安全级别中启用‘对未标记为安... 阅读全文
posted @ 2012-09-10 15:29 itprobie-菜鸟程序员 阅读(3132) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示