Can TableTools export (T/F) Checkbox data onto Excel?

Can TableTools export (T/F) Checkbox data onto Excel?

CancosCancos Posts: 6Questions: 0Answers: 0
edited June 2012 in TableTools
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!

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    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: 6Questions: 0Answers: 0
    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.