1,需要依赖的jar包, <!-- POI(operate excel) start --> <!-- the version of the following POI packages must be consistent --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.17&
如果只是简单的处理的话,只需要引用下载压缩包里的 NPOI.dll (office 2003)或 NPOI.OOXML.dll (office 2007) 文件而已. using System; using System.Collections.Generic; using System.Linq; using System.Text; using NPOI.SS.UserModel; using System.IO; using NPOI.XSSF.UserModel; namespace N