Export edited columns to Excel

Export edited columns to Excel

DodoOliveiraDodoOliveira Posts: 2Questions: 1Answers: 0
edited February 2023 in Free community support

I have a problem to export a column of my table, this column was edited using this example
https://www.c-sharpcorner.com/article/incell-edting-using-datatable/ it works but when I export to Excel this column is null.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,341Questions: 26Answers: 4,954
    edited February 2023 Answer ✓

    Looks like the edit functions only update the HTML of the table. Datatables doesn't know about these updates. You might need to use cell().invalidate() or row().invalidate() to have Datatables updates its data cache based on the HTML changes.

    Or you can use cell().data() instead of updating the HTMl directly. This will allow Datatables to update both its cache and the HTML.

    If you still need help please build a running test case with the example code provided and we can collaborate on what you need to do.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Have you looked at the Editor which has all the editing code built-in?

    Kevin

  • DodoOliveiraDodoOliveira Posts: 2Questions: 1Answers: 0

    Hi Kevin,

    thank you very much for the answer, I managed to solve my problem using row().invalidate() :)

Sign In or Register to comment.