Export Multiple Tables into Single Excel File

Export Multiple Tables into Single Excel File

oceandriveoceandrive Posts: 1Questions: 0Answers: 0

Hi All,

Thanks everyone for the help.
I have two tables and a single export button on the top.

table1.button(1-1).trigger();
table2.button(1-1).trigger();

On click of this button I am able to trigger export all tables.
I am able to read the content of both the excel files created and form them into a single excel file.

The problem I am having is three excel files are getting downloaded.
How can I stop the download of individual tables, and just download the combined file.

Thanks

Replies

  • colincolin Posts: 15,167Questions: 1Answers: 2,588

    Hi @oceandrive ,

    I don't believe you can, with that setup. DataTables is giving you two files, as you asked for each table to have its data exported. The third is your one. The only option would be to create your own file from the data within the table (you can get this with rows().data(), and not use the DataTables Buttons exporting.

    Cheers,

    Colin

This discussion has been closed.