File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "hassle with jakarta poi" Watch "hassle with jakarta poi" New topic
Author

hassle with jakarta poi

nomeaning
Greenhorn

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

http://jakarta.apache.org/poi/hssf/index.html

code is below..

thanks!


classes>
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
Marshal

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


Ping & DNS - my free Android networking tools app
nomeaning
Greenhorn

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hassle with jakarta poi
 
Similar Threads
java program for pdf file to excel file conversion
java.io.FileNotFoundException
Read a .xls,.xlsx file format using XSSF
use Apache POI to read Excel file problem
an Exception report