C# 各种导出的方法总结
第一种:使用 Microsoft.Office.Interop.Excel.dll 首先需要安装 office 的 excel,然后再找到 Microsoft.Office.Interop.Excel.dll 组件,添加到引用。 public void ExportExcel(DataTable dt) { if (dt != null) { Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application();
下载地址
用户评论