Two Laptop Bag
The moose likes Other Open Source Projects and the fly likes jxls problem 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 "jxls problem" Watch "jxls problem" New topic

jxls problem

Yasmeen MohdRafi

Joined: Nov 27, 2008
Posts: 2
I am a novice in this field.

My purpose is to create a bean from xls, but i am unable to do so.
Could anyone please help me out in figuring as what the error is.
Code is as follows:

I have a bean class:

I have a xml mapping file.

I have another java file as follows

Kindly help..

[ UD: Please UseCodeTags when posting code of any length. The code is unnecessarily hard to read without them. ]
[ December 16, 2008: Message edited by: Ulf Dittmer ]
Cristina Tarcuta

Joined: Jun 18, 2009
Posts: 1

I do not know if you solved your problem ... but for making available a solution for other users also, I decided to post an answer.

For solving you problem your should make the following changes:
1. In the class Infoxl2Bean you need to put List infos = new ArrayList(); as class member (to declare it outside the methods) and to have a set method for it.

2. Change beans.put("infos", infos); to beans.put("infosHolder", this);

3. In the config XML change items="infos" to items="infosHolder.infos"

Good luck.
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi Cristina and welcome to the Javaranch!

I'd normally say Don't wake the zombies, they bite! but we're easing up on that polciy a little, just posting the link for your future reference .

Happy ranching!

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link:
subject: jxls problem
jQuery in Action, 3rd edition