Wooooo
Wooooo

Reputation: 91

apache poi 3.6: Reading an xlsx file

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

XSSFWorkbook workBook = 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

Upvotes: 1

Views: 3069

Answers (2)

ksm
ksm

Reputation: 401

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

Upvotes: 0

dbyrne
dbyrne

Reputation: 61081

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

Upvotes: 2

Related Questions