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: 61,667Questions: 1Answers: 10,096 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

This discussion has been closed.