转自https://www.cnblogs.com/zuowj/archive/2015/05/04/4475663.html转别人的,做了一点点改动 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.Generic; using System.Data; using System.Linq; using Sys
添加引用 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Text; 导入 public DataSet ExcelToDataTable(string path) { DataSet dataSet1 = new DataSet(); HSSFWo
代码: using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; namespace CMS.Common { public class ExcelHelp