POI操作Excel表格系列5 --- 遇到的问题

POI 操作过程中遇到的一些问题


Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.apache.poi.util.POILogger.log(ILjava/lang/Object;)V from class org.apache.poi.openxml4j.opc.PackageRelationshipCollection

解决方案: 保持各个jar包版本一致


<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.14-beta1</version>
</dependency>
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml-schemas</artifactId>
    <version>3.14-beta1</version>
</dependency>
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.14-beta1</version>
</dependency>


2.XSSFColor 获取为null 

解决方案:保证接口都是同一类型,比如不允许XSSF乱入HSSF

你可能感兴趣的:(POI操作Excel遇到的问题)