Does the ExportData function only export what's rendered in the table?

Does the ExportData function only export what's rendered in the table?

rcheungrcheung Posts: 7Questions: 5Answers: 0

https://datatables.net/reference/api/buttons.exportData()

I have a table with about 30 columns (lot of details, free text, etc.).

I only want to render about 10 of the important columns in the DataTable for the user to see so my DataModel (using .NET Library) only contains those 10 columns.

If I export to excel, can I export the whole 30 columns (Maybe refer to a larger DataModel)?

Answers

  • allanallan Posts: 48,282Questions: 1Answers: 6,967 Site admin

    The export that the Buttons library offers is client-side, so the data you want to export fundamentally needs to be at the client-side. You can select which columns you want to export and you can also hide columns you don't want to be visible in the DataTable, while still allowing them to be exported (columns.visible).

    If however you don't want the export data to be available at the client-side, you would need to do a server-side export.

    Allan

Sign In or Register to comment.