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
精彩评论