Hi Leo, Please find attached the template.
Thanks! Deina ________________________________ From: Leo <leon...@gmail.com> To: Deina <deina_s...@yahoo.com> Cc: "jxls-user@lists.sourceforge.net" <jxls-user@lists.sourceforge.net> Sent: Sunday, January 15, 2012 11:23 AM Subject: Re: [jXLS-user] Jxls iterating over arrays Hi Deina, Can you share your template to make it more understandable? -- Leo On Sun, Jan 15, 2012 at 1:20 AM, Deina <deina_s...@yahoo.com> wrote: Hi, > > >I have a List of objects, lets say: List<Column> > >A column object looks like this : >Column -Integer id > > -String name > - List<String> values > > >The generated excel file should look like this: >id1 id2 ...... etc > >name1 name2 ...... > >val11 val21 > >val12 val22 > >val13 > >The template looks like this: ><jx:forEach items="${cols}" var="col"> ${col.id} </jx:forEach> ><jx:forEach items="${cols}" var="col"> ${col.name} </jx:forEach> ><jx:forEach items="${cols}" var="col"> <jx:forEach items="${col.values}" >var="val"> </jx:forEach> > >${val} > ></jx:forEach> > > >When trying to generate the excel using this template I get an error: > java.lang.RuntimeException: items property in forEach tag must be a >collection. col.products is not > >The same template only with the first two line works just fine. > >Any idea why this happens? > >Best regards, >Deina > > > >------------------------------------------------------------------------------ >RSA(R) Conference 2012 >Mar 27 - Feb 2 >Save $400 by Jan. 27 >Register now! >http://p.sf.net/sfu/rsa-sfdev2dev2 >_______________________________________________ >jXLS-user mailing list >jXLS-user@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/jxls-user > > ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ jXLS-user mailing list jXLS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jxls-user
template.xls
Description: MS-Excel spreadsheet
------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________ jXLS-user mailing list jXLS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jxls-user