File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes hassle with jakarta poi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "hassle with jakarta poi" Watch "hassle with jakarta poi" New topic

hassle with jakarta poi


Joined: Sep 16, 2005
Posts: 21
hello, anybody who helps?

i have a hardship and dont know why.. it has to do with the argument FileInputStream that i send to the POIFSFileSystem constructor, but dont detect the error... it should show the 1st sheet's name

code is below..


classes>java -classpath org\poi\poi.jar;. org.base.TestPOI
Exception in thread "main" java.lang.NullPointerException
at org.apache.poi.util.IOUtils.readFully(
at org.apache.poi.util.IOUtils.readFully(
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(
at org.base.TestPOI.main(

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41635
Is the file readable in the sense that File.canRead() returns true?

Ping & DNS - my free Android networking tools app

Joined: Sep 16, 2005
Posts: 21
yes, it can be readable... but i dont know what happens...

but instead i have written the code like this:

and it worked well... but i have still the question mark
It is sorta covered in the JavaRanch Style Guide.
subject: hassle with jakarta poi