How does file export use the HTML5 API?
How does file export use the HTML5 API?
lcioffi
Posts: 1Questions: 1Answers: 0
Hello,
I'm reading here that CSV export uses the HTML5 API.
When I edit a table in the DOM and then click export, the edits are not reflected in the exported file. This makes me think that the CSV exporter is reading a different copy of the data than the one provided in the DOM.
Any help is greatly appreciated!
This discussion has been closed.
Answers
It suggests that any edits you make are being written to the DOM rather than using the DataTables API to update the values (
row().data()
orcell().data()
). Is that the case?If you can only update the DOM, and not use the API, you would need to call
row().invalidate()
to tell DataTables to reread from the DOM.You are correct that Buttons uses the DataTables cache to get the data, since that is a lot quicker than getting the information from the DOM.
Allan