wood burning stoves 2.0*
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 Spring in Action this week in the Spring 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(IOUtils.java:51)
at org.apache.poi.util.IOUtils.readFully(IOUtils.java:36)
at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:71)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>( POIFSFileSystem.java:83)
at org.base.TestPOI.main(TestPOI.java:29)

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42289
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
Don't get me started about those stupid light bulbs.
subject: hassle with jakarta poi