How to Export Grouped rows
How to Export Grouped rows
I cannot export the grouped rows using button exports. I used my own functionality using basic row grouping code for grouping rows in data tables and when i exported the table using "buttons" the grouped rows are not exported. Also I am using static serial number which is also not exported, instead it is found empty. Is there a way to export the contents which are added later. Any idea would be helpful.
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
Hi,
No, that is not a supported feature at this time I'm afraid. I've tried to make that clear:
Allan
Thank you very much for your reply
Your plugin helped me a lot.
I wish to share my code which supports any number of nested groping
I exported the grouped contents to excel, pdf and print by adding same functionality in _exportData function in buttons.js file. But i am not able to give colspan in excel for grouped row. The pdf and print exports works fine. Also is there a plugin in jquery for execute the group and sub total functions in excel.
There isn't a jQuery plug-in for it. You would need to modify the Buttons code that the export functions use to add the colspan functionality into them. I don't know what the correct XML for that is in an XLSX file. You would probably need to refer to the open spreadsheet standard documents.
Allan
Thank you Allan,
I exported to excel using PHPExcel by passing the table data through ajax and the groping, column merge and cell formats works perfectly.
Thank you very much for your plugin
Hi,
I cannot export the grouped rows using button exports.
@allanHello @allan
I cannot export the grouped rows using button exports.
I can use the copy buttonDid you look at the links Allan provided in the second post?
https://datatables.net/download/compatibility
https://datatables.net/extensions/rowgroup/#Limitations-and-future-work
The row group info is not included using the export buttons.
Kevin
You could group the rows and export, because really if I have to do that. How can I solve this problem. What else can I do ?