Generate xls like a crosstab report

I am using Flexcel for some tasks and it is very powerfull, but I have some xls gerenerated with the data like a crosstab, this means that I need the collums grows with the number of value.
This is a sample, that I generate with flexcel, but I have lot of processing, to create in memory dataset.

The data is like that, as you can see the collum field Length will create as many collumns that the report needs ( a crosstab behavior ).

I am creating those xls using the flexcel api, but I think there is a better way to create it.
Maybe using template or pivot table.

I wonder know the best way to generate these xls ?

Thanks in advance,
José Carlos.

I am not sure that going with reports is going to simplify this. You can do it with reports(see the bidirectional reports demo) but the complexity is going to be the same or more than doing it with the API.

Reports are very useful when the structure of the report is simple, but you have a lot of formatting and stuff to make it look nice. Formatting directly in Excel is much simpler than doing it by code, and when you want to change the format, it is simpler too. But once you get to a big complexity, reports can get difficult to follow. So, while there is the possibility to do it with a bidirectional report, I would personally stick to the API, especially if you already have it coded. Unless there is a lot of formatting in which case a report can make sense.

A picot table is another option but we currently don't calculate pivot tables, so if you make one, you won't be able to export it to pdf/html with FlexCel. Again, if you already have the code for the API, I would stick with that.