TableTools apparently only exports 'display' type

TableTools apparently only exports 'display' type

kmielkmiel Posts: 4Questions: 2Answers: 0
edited April 2015 in Free community support

Hello,

Maybe my search criteria was slightly off but I couldn't find an answer.

I have the following (snippet) code:

columnDefs: [
    {
        render: function (data, type, row) {
            var img = (data == 'none') ? 'accept' : 'remove';
            return (type == 'display') ? '<center><img src="/img/' + img + '.png"></center>' : data;
        },
        targets: 9
    },
]

When using one of the export buttons (CSV/Excel), I end up with an empty column (as an image is displayed). Is it true that TableTools only takes the 'display' type of data? Is there a way to grab 'underlying'/actual data?

Thanks,
Camille

Answers

  • sjursjur Posts: 4Questions: 1Answers: 0

    Hi Camille,

    Pls could you help me with how you got table tools working? If you already have working code? It's not working for me as per my post.

    Do you have a JSFiddle I could check out? Or maybe look at mine here:
    http://jsfiddle.net/h2bof5cr/2/

  • kmielkmiel Posts: 4Questions: 2Answers: 0

    Simply use the 'alt' tag for plain text in any of the exports.

  • kaiaeberlikaiaeberli Posts: 11Questions: 1Answers: 2

    hi kmiel,

    I am having a similar problem, did you ever sort it out?
    Trying to display and export two different datapoints (display in 2 decimals, export in 10 decimals)

This discussion has been closed.