摘要:
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>/ 阅读全文
摘要:
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 阅读全文
摘要:
/***-------------------------------------------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. 阅读全文