NoSuchFieldError when reading Excel sheet in java

前端 未结 4 1042
情歌与酒
情歌与酒 2021-01-18 05:15

I\'ve followed a simple guide to constructing a workbook using Apache POI XSSF. Following the same guide I was able to WRITE an Excel sheet, however when attempting to read

相关标签:
4条回答
  • 2021-01-18 05:49

    I got same error with different constant:

    Exception in thread "main" java.lang.NoSuchFieldError: RETURN_NULL_AND_BLANK

    Googled lot but no answer. I was using apache poi-ooxml version 3.11. Later I changed to version 3.17. Then it was working fine.

    Hope this might helpful someone.

    0 讨论(0)
  • 2021-01-18 05:51

    I got the same error, try changing the XSSFWorkbook diclaration to HSSFWorkbook. It worked for me.

    0 讨论(0)
  • 2021-01-18 05:57

    For the following error "java.lang.NoSuchFieldError: RETURN_NULL_AND_BLANK"

    Please perform following task: upgrade the APACHE POI 3.** to the latest version in my case i have done the following thing i was previously using the apache poi 3.09 later i have upgraded the lib to latest version i.e 3.12 and its work !!

    Perform the following steps and your code will but make sure the error should be same.

    0 讨论(0)
  • 2021-01-18 05:58

    After looking around a bit. I browsed the documentation for APACHE POI, and saw that this was one of the constants (not that i know what that really means).

    But eventually, I realized all the tutorials I used were pre-2014.

    So I just changed my Maven POM to version 3.11 for both dependencies of apache-poi, and poi-ooxml.

    Its working now.

    0 讨论(0)
提交回复
热议问题