How to export multiple rows in header with colspan

How to export multiple rows in header with colspan

MoonfaceMoonface Posts: 5Questions: 0Answers: 0
edited November 2011 in TableTools
I have a DataTable that has multi-row table header with colspan. However when I use the TableTools plugin it's exporting only last header row. I would like to ask how to fix it?

Replies

  • MoonfaceMoonface Posts: 5Questions: 0Answers: 0
    edited November 2011
    There is no help so I will give an example:

    [code]



    Header 1
    Header 1
    Header 1
    Header 1
    Header 1


    Header 2
    Header 2
    Header 2
    Header 2
    Header 2
    Header 2




    2004
    example
    1795
    42,1
    140
    45,8
    1935
    42,3



    [/code]

    So when I using TableTools it's only exporting last row of header (in this example it's: Header 2) and content of a table (tbody). Can someone help me please?
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Currently TableTools will export the unique header element that DataTables has found for each column only (i.e. the column with the sort event handler / icon). It would require a modification to TableTools in order to so colspan/rowspan in the export. That also isn't compatible with CSV and the Excel output would need to do a real XLS file rather than a CSV one. So quite a bit of work required to do it - but I'm sure its possible.

    Allan
  • MoonfaceMoonface Posts: 5Questions: 0Answers: 0
    Thanks for answer Allan.
This discussion has been closed.