DataTables JS / TableTools JS - exporting and printing

DataTables JS / TableTools JS - exporting and printing

vivek.krishnanvivek.krishnan Posts: 3Questions: 2Answers: 0

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

  1. When I try to export to Excel, I get only the 1st columns, don't get the second;
  2. In excel no cell colors are exported
  3. 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

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Your HTML is invalid, especially the table. DataTables requires a valid HTML table if it is to perform effectively.

  • vivek.krishnanvivek.krishnan Posts: 3Questions: 2Answers: 0

    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?

This discussion has been closed.