简体   繁体   中英

two datatable download in single excel

I have two datatable with different fields and I want to download in both table as single excel. I tried with same class name for both table.now downloading only one table.I want to display the first table above and second table below in a excel. I have two tables with class name example. Fiddle https://jsfiddle.net/dg0cbhrL/1/

$('.example').dataTable();

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM