Export table data to excel (server-side) with formatting

Export table data to excel (server-side) with formatting

balalinuxbalalinux Posts: 3Questions: 0Answers: 0
edited February 2014 in TableTools
Hi Allan,

Thanks for the great tool.

I was wondering if its possible to extract the table data along with the formatting info using any API / BETA? Similar to fnGetTableData() but with formatting info.

Eg. TEST

So that, it will be possible to POST this info to a custom server side script for the full table export (with preserving the format too).

If its not possible now, please let me know on whether its in your plans at least :)

But I can contribute to its development if you could guide me on the best approach to tweak your APIs.

Thanks.

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    For doing this on the client side see this issue in the TableTools GitHub repo: https://github.com/DataTables/TableTools/issues/44 .

    On the server-side, you would need to modify the get function to get the styling of the cells. That would be horribly slow imho, particularly for large tables. You'd then need to augment the data sent tot he server with this information. Not a trivial tweak, but it would be possible.

    Allan
  • balalinuxbalalinux Posts: 3Questions: 0Answers: 0
    Thanks Allan.

    Im clear on what to be done on the server side. But, Im more concerned about the effective way of getting the styling of cells from your internal data structures. Any pointer to this would really help.

    Otherwise, I will understand your internal data structures/apis and implement myself :)
  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    There is nothing in TableTools at the moment to get the current styling since it can't do anything with it. So you would just use jQuery's `$().css()` method to get the styling information you want.

    Allan
  • balalinuxbalalinux Posts: 3Questions: 0Answers: 0
    Thanks Allan.
This discussion has been closed.