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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply 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: 35241
    
    7
Is the file readable in the sense that File.canRead() returns true?


Android appsImageJ pluginsJava web charts
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: hassle with jakarta poi
 
Similar Threads
Read a .xls,.xlsx file format using XSSF
an Exception report
java.io.FileNotFoundException
use Apache POI to read Excel file problem
java program for pdf file to excel file conversion