Define the export data in table (and not with format in export options)

Define the export data in table (and not with format in export options)

mzardmzard Posts: 11Questions: 4Answers: 0

Hi,
Is it possible to define the data for export (Buttons extension) using html5 data-* attributes?
Something like this

<table id="example" class="display" style="width:100%"> 
<tbody> 
<tr> 
<td data-export="Tiger Nixon">T. Nixon</td> 
<td data-export="System Architect">System Architect</td> 
<td data-export="25/4/2011">Mon 25th Apr 11</td> 
<td data-export="320.800">$320,800/y</td> 
</tr>
</tbody>
</table>

or something similar?
It think it's too complicated and verbose define the format in exportOptions for each columns (I have a lot of columns)...

Cheers
Matteo

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @mzard ,

    I don't think you can use just the HTML5 attributes, but you can use a combination of the two, something like this.

    Hope that does the trick,

    Cheers,

    Colin

  • mzardmzard Posts: 11Questions: 4Answers: 0

    Good suggestion/trick!
    Thanks
    Matteo

This discussion has been closed.