DataTables logo DataTables

via Ad Packs
Can TableTools export (T/F) Checkbox data onto Excel?
  • CancosCancos
    Posts: 6
    Our current table only exports all the other data besides the checkbox True and False information. To explain in more detail, our Excel spreadsheet does show that it pulls the header information that contain the checkbox fields, but all the TBODY data that corresponds to it doesn't show anything. Is there a workaround/option to fix this? Thanks in advance!
  • allanallan
    Posts: 15,882
    You can use fnCellRender to render a string as you wish: http://datatables.net/extras/tabletools/button_options#fnCellRender although looking at it, there is no direct reference to the DOM element, which is a bit of a limitation.

    I've just committed a change to TableTools which you can pick up from the nightly ( http://datatables.net/download ) which will now allow fnCellRender to get 4 parameters passed in:

    1. The value of the cell
    2. The column index
    3. The TR node - new
    4. The DataTables internal index (you generally won't need this, but it is useful) - new

    With the TR node and the column index you can reference the cell directly and render the checkbox state as you wish :-)

    Allan
  • CancosCancos
    Posts: 6
    Thanks Allan,

    I'll make sure to test out the new changes and see if I can get them working.
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.

In this Discussion