DataTables JS / TableTools JS - exporting and printing
DataTables JS / TableTools JS - exporting and printing
I am using dataTables (http://www.datatables.net/release-datatables/media/js/jquery.dataTables.js) & tableTools (http://www.datatables.net/release-datatables/extensions/TableTools/js/dataTables.tableTools.js & http://www.datatables.net/release-datatables/extensions/TableTools/css/dataTables.tableTools.css) and displaying a table and want to print it. But am having problems with the same.
Here are my options
http://live.datatables.net/qoxocice/1/edit
- When I try to export to Excel, I get only the 1st columns, don't get the second;
- In excel no cell colors are exported
- In PDF I get only 1 page output thought the report HTML is 13 pages. I have tried to include columns, but no success.
Any help would be much appreciated.
HTML output: http://i.imgur.com/rcrdrLN.png
PDF output: (only the heading column): http://i.imgur.com/9HvcNrX.png
Answers
Your HTML is invalid, especially the table. DataTables requires a valid HTML table if it is to perform effectively.
ok, care to explain a little more, do you mean the colspan I have added makes a difference? But shouldn't the output be consistent for Excel, PDF and Print?