• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hassle with jakarta poi

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)


 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the file readable in the sense that File.canRead() returns true?
 
nomeaning
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic