We use Flexcel to generate a HTML report.
I have a HTML report based on a excel template that I like to sort, but I don't get the sorting working.
this is the config in the template I have now.
Hi,
Maybe if you can send the template it would be simpler for us to figure out what is happening, since there is a lot I can't see in the screenshots.
But from what I see in the images, it looks like you defined a table ArtikelenMaster sorted by artikel_omschrijving. But then in the template, it looks like you are using <#artikelen.artikel_omschrijving> instead of <#artikelenMaster.artikel_omschrijving> ?
remember that only ArtikelenMaster is sorted, Artikelen is not.
The thing is, FlexCel will never sort Artikelen. It does not sort existing tables, it creates new tables sorted which are based in existing ones.
So, to use the sort functionality you could:
rename all cells in the spreadsheet from say <#artikelen.kenmerk1_waarde> to <#artikelenMaster.kenmerk1_waarde>
In this template you are using artikelen everywhere, and artikelen isn't sorted.
Other solution to avoid rewriting all cells in the template would be to not pass "artikelen" with addtable to the template. You would do a AddTable("artikelen_unsorted", ...), then in the config sheet define:
This way, artikelen will be sorted (artikelen_unsorted won't be, but you won't use that anywhere)
Finally, the simplest solution if you are using an SQL db to get the data, might be not to use the SORT functionality in the config sheet, and make sure artikelen is sorted when you do the SQL to retrieve the data. Just add a Sort By to the SQL.