Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read excel file using jXls

 
Amar Jee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to read excel rows to java bean but keep getting it keeps failing with null pointer exception.
Below is the code extract from XLSForEachBlockReaderImpl where itemsCollection comes out to be null.
PFA the xlsx file used for the below code (please replace .txt with .xlsx).
Please advice.



Following are the files I'm using:
RowImport.java
------------------------


config.xml
-------------------------


IR.java
-----------------
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch! Could you please UseCodeTags next time? I've added them for you this time, and see how much easier it is to read your code?

Can you also please post your exception? That will make it easier to see where the problem is.
 
Amar Jee
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. Thanks!
 
marco fago
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try

instead. It should work.
M@rco
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome marco fago!
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lakshmi Arun,
Your post was moved to a new topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic