As it appears in your template you actually want to iterate through a
collection and put all its items into a single Excel cell like for example
"06:00-10:00, 11:00-13:00, 15:00-17:00" .
Iterating through a collection in a single cell is not directly supported by
jxls. So the easiest way to achieve this would be to iterate the collection
in Java and create a string value that need to be put into an Excel cell.

--
Leo

On Fri, Oct 14, 2011 at 1:06 PM, Onn Tai Yong <onn...@gmail.com> wrote:

> Hi Leo,
>
> Thanks for your response.
>
> 1. Do you mean that the fastest way for me to achieve this is to
> denormalize my collection to a string property ?
> 2. Is there any alternative I could use grouping (e.g. //:<dto>) or
> jx:forEach to achieve this goal ??
>
>
> Your help is really appreciated .. :D
>
>
>
>
>
> On Fri, Oct 14, 2011 at 6:03 PM, Leo <leon...@gmail.com> wrote:
>
>> Hello,
>>
>> As I can see from your template you want to output the list of
>> startTime/endTime pairs into a single cell.
>> In this case I think the simplest way to achieve this would be to create a
>> simple getter for each of your DTO lists which concatenates
>> startTime/endTime values into a string. And then use this new property in
>> your .xls template.
>>
>> --
>> Leo
>>
>> On Fri, Oct 14, 2011 at 10:48 AM, Onn Tai Yong <onn...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I would like to achieve the result as in scheduledSlotTemplate using
>>> JXLS. My dto objects  are as followed.
>>>
>>>
>>> public class MainDTO {
>>>      private String id;
>>>      private String nric;
>>>      private String name;
>>>      private List<DetailDTO> mondayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> tuesdayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> wednesdayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> thursdayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> fridayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> saturdayDTOs = new ArrayList<DetailDTO>;
>>>      private List<DetailDTO> sundayDTOs = new ArrayList<DetailDTO>;
>>>
>>> }
>>>
>>> public class DetailDTO {
>>>     private String startTime;
>>>     private String endTime;
>>> }
>>>
>>>
>>> I wonder if i could achieve the sample sheduled slot template with jxls
>>> and how can i achieve this ? The difficulty i am facing is i cannot use
>>> <jx:forEach> in a cell or same row..
>>>
>>>
>>> Thanks in advance..
>>>
>>> --
>>> Regards,
>>>
>>> Onn Tai, Yong
>>> onn...@gmail.com
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> All the data continuously generated in your IT infrastructure contains a
>>> definitive record of customers, application performance, security
>>> threats, fraudulent activity and more. Splunk takes this data and makes
>>> sense of it. Business sense. IT sense. Common sense.
>>> http://p.sf.net/sfu/splunk-d2d-oct
>>> _______________________________________________
>>> jXLS-user mailing list
>>> jXLS-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jxls-user
>>>
>>>
>>
>
>
> --
> Regards,
>
> Onn Tai, Yong
> onn...@gmail.com
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
jXLS-user mailing list
jXLS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jxls-user

Reply via email to