using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; namespace DMEnterpriseAdministration { public cla…
根据项目需要,需要对excel进行导入导出,所以选择NPOI,优点在这里就不详细介绍了,下面进入正题. public int Import(string path) { IList<Student> list = new List<Student>(); try { string strFileName = path; using (FileStream file = new FileStream(strFileName, FileMode.Open, FileAccess.Rea…