1.导入NPOI.dll 2.添加类NPOIExcel.cs using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.OleDb; using System.IO; using System.Drawing; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.U