把asp.net中的数据直接导入至excel表中的例子。
1.web.config中加入
 <identity impersonate="true"/>
2.用Microsoft.Excel 11.0 Object Library COM组件
3.下面代码。
  1ASP.NET中数据导入至Excelusing System;
  2ASP.NET中数据导入至Excelusing System.Collections;
  3ASP.NET中数据导入至Excelusing System.ComponentModel;
  4ASP.NET中数据导入至Excelusing System.Data;
  5ASP.NET中数据导入至Excelusing System.Drawing;
  6ASP.NET中数据导入至Excelusing System.Web;
  7ASP.NET中数据导入至Excelusing System.Web.SessionState;
  8ASP.NET中数据导入至Excelusing System.Web.UI;
  9ASP.NET中数据导入至Excelusing System.Web.UI.WebControls;
 10ASP.NET中数据导入至Excelusing System.Web.UI.HtmlControls;
 11ASP.NET中数据导入至Excelusing System.Data.SqlClient;
 12ASP.NET中数据导入至Excelusing System.Configuration;
 13ASP.NET中数据导入至Excelusing System.Runtime.InteropServices;
 14ASP.NET中数据导入至Excelusing Excel;
 15ASP.NET中数据导入至Excelusing System.Reflection;
 16ASP.NET中数据导入至Excel
 17ASP.NET中数据导入至Excelnamespace CSharpNET_ExcelTest
 18

相关文章:

  • 2021-11-14
  • 2021-07-13
  • 2022-02-24
  • 2021-07-09
  • 2022-12-23
  • 2022-02-17
猜你喜欢
  • 2022-12-23
  • 2022-02-24
  • 2021-05-23
  • 2021-06-01
  • 2021-11-24
  • 2021-08-05
相关资源
相似解决方案