摘要: using System;using System.Data;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data.OleDb;using Microsoft.Office.Interop.Excel;using System.Reflection; // For Missing.Value and BindingFlagsusing System.Runtime.InteropServices; // For COMException/// <summary>/ 阅读全文
posted @ 2011-04-20 21:28 KimSky 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 1、由dataset生成 public void CreateExcel(DataSet ds,string typeid,string FileName) { HttpResponse resp; resp = Page.Response; resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); resp.AppendHeader("Content-Disposition", "attachment;filename=" + FileName); stri 阅读全文
posted @ 2011-04-20 20:56 KimSky 阅读(215) 评论(0) 推荐(0) 编辑
摘要: /***-------------------------------------------Word-----------------------------------***/ private void WordReplace(string filePath, string strOld, string strNew) { ///实例化顶级对象 Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.ApplicationClass(); object nullobj = Syst. 阅读全文
posted @ 2011-04-20 20:02 KimSky 阅读(310) 评论(0) 推荐(0) 编辑