aspose file tools*
The moose likes Other Open Source Projects and the fly likes Read excel file using jXls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Read excel file using jXls" Watch "Read excel file using jXls" New topic
Author

Read excel file using jXls

Amar Jee
Greenhorn

Joined: Oct 22, 2010
Posts: 6
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

Joined: Oct 27, 2005
Posts: 19692
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Amar Jee
Greenhorn

Joined: Oct 22, 2010
Posts: 6
Sure. Thanks!
marco fago
Greenhorn

Joined: Nov 02, 2010
Posts: 1
Try

instead. It should work.
M@rco
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

And welcome marco fago!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18563
    
    8

Lakshmi Arun,
Your post was moved to a new topic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read excel file using jXls