Rowgroup and excel export. How to keep different columns
Rowgroup and excel export. How to keep different columns
itajackass
Posts: 165Questions: 49Answers: 3
Hi i modified this usefull script ( https://live.datatables.net/mucewuca/6/edit ) to my needs:
- rowgroup keeping ALL the columns (instead a only one colspan)
- rowgroup with one cell for the "total of: ...." and one dedicated to sum
- only one sheet
I don't find the piece of code where modify to get rowgroup keeping all columns. Any ideas? thanks
here my modified script: https://live.datatables.net/mucewuca/9/edit
This question has an accepted answers - jump to answer
Answers
update: after a lot of code removed, i get my goal, but I think i've stripped TOO MUCH USEFULL code
https://live.datatables.net/mucewuca/10/edit
Yes, that example has a lot of code to provide flexibility but that makes it complex. If you don't need that level of flexibility then remove what you don't need It's easier for troubleshooting at a later date.
Kevin
I think your original code will be perfect if here:
"this.data()" can retrieve also programatically added rows, like in endRender function. In this case, grouped rows are already done to be added to excel. Any change to add a parameter to get also the grouped rows? like for example: this.data(['retrieveGroupedRows': true])
RowGroup directly inserts the
startRender
andendRender
rows into thetbody
. This only happens for the rows shown on the page.startRender
andendRender
are not generated for pages not displayed. Plus there are no Datatbles API's to fetchstartRender
andendRender
. That is why the example generates them on the fly.Kevin