作者 shenhailong

更改 poi 版本

优化代码
... ... @@ -62,12 +62,12 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.6</version>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
<version>4.1.0</version>
</dependency>
<dependency>
... ... @@ -82,6 +82,12 @@
<version>5.2.0.BUILD-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>9.0.56</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
... ... @@ -98,4 +104,4 @@
</plugins>
</build>
</project>
\ No newline at end of file
</project>
... ...
... ... @@ -18,6 +18,8 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import static org.apache.poi.ss.usermodel.CellType.STRING;
/**
* shenhailong
* 2020/4/27/14:29
... ... @@ -143,7 +145,7 @@ public class ExcelUtils {
if (hssfCell == null) {
rowList.add("");
} else {
hssfCell.setCellType(Cell.CELL_TYPE_STRING);
hssfCell.setCellType(STRING);
rowList.add(String.valueOf(hssfCell.getStringCellValue()));
}
}
... ...