开发者

apache poi 3.6: Reading an xlsx file

开发者 https://www.devze.com 2022-12-31 03:18 出处:网络
I have a relatively dumb newb question, Im trying to open an xlsx file for reading using the apache POI 3.6.

I have a relatively dumb newb question, Im trying to open an xlsx file for reading using the apache POI 3.6.

XSSFWorkbook workBook = 开发者_StackOverflow中文版new XSSFWorkbook("C:\test.xlsx");

The xlsx file was saved in excel 2007, the error Im seeing is: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException

  • I dont know what the solution is... any ideas and/or example code?


Your classpath is missing one of the dependencies for Apache POI. Specifically, you are missing the XMLBeans jar. Are you using Maven?


and you can download it from here: http://apache.securedservers.com/xmlbeans/binaries/xmlbeans-2.5.0.zip

if (most ppbly) you're using an IDE (eclipse etc) add it in the build path...

if invoking from the CLI use the -cp switch as you might be doing for everything else...

rgds

-ksm

0

精彩评论

暂无评论...
验证码 换一张
取 消