Microsoft.Office.Interop.Excel.Application eApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); 或 Microsoft.Office.Interop.Word.Application wApp = new Microsoft.Office.In...
第一种方式 :需引用 Microsoft.Office.Interop.Excel,安装office public bool ExportToExcel() { Microsoft.Office.Interop.Excel.Application xlApp; try { xlApp = new Microsoft.Offi...
protected void btgua_Click(object sender, EventArgs e) { DataTable dt = ds.Tables[0]; if (dt != null) { #region 操作excel Microsoft.Office.Interop.Excel.Workbook xlWorkBook; Microso...