Export the data on displayed
Export the data on displayed

For example I have a table with some Column containing number 5, i change that column from "Inspect Elements" to number 10, when i export to CSV the value still number 5
so, how to export the table and keep number to 10?. Thanks..
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @monstakara ,
That will depend on how you're changing the values. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi @colin ,
Thanks for the answer, here i link to a test case live.datatables.net/daqohifa/1/edit .
there i try to change column text from 5 to 10 by button "Change Column Text to 10" then i click export CSV button, from the export result the column text still number 5
Hi @monstakara ,
It's because you're changing the value in the DOM, but not notifying DataTables. You can either do that by using
row().data()
to change the data internally, or probably more simply just invalidate the table withcells().invalidate()
like here.Cheers,
Colin
Hi @colin ,
OMG, Thats the answer, I think it won't be easy. Thank you very much, You saved my day