How can I use colspan in the footer with html5button export to excel or print?

How can I use colspan in the footer with html5button export to excel or print?

muratguvenmuratguven Posts: 2Questions: 2Answers: 0

I have a table with 8 columns. I want to put a disclaimer for the table data in the footer. So in HTML I put

<tfoot>
<tr>
<td class="text-center" colspan="8">FOOTER MESSAGE</td>
</tr>
</tfoot>

In the HTML view this looks great, but when I export it to excel using html5 it puts this in the footer over every column (so shows it 8 times). Is there a way to just get it once in the center? If not is there a way to just get it to show up once, but not in the center?

Thanks

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    At this time, there is no option to use colspan or rowspan in the footer.

    A workaround could be to use a renderer like in this example to check the column index and only return the values for columns you want. You would use a footer formatter rather than a body formatter like in that example.

    Thanks

    Tom

This discussion has been closed.