Dash DataTable - Export as CSV

Being able to export to CSV would be a lifesaver! Any ideas on how to do this?

This has been answered a few times in the forum - search “download CSV”: https://community.plotly.com/search?q=download%20csv%20category%3A16

It would be great to just have an optional parameter for the Dash DataTable to include a download to CSV link. The URI approach is most commonly used, but has a size limit and doesn’t work in old browsers like IE11. It seems like this approach from Flask works in IE11, although I’m not sure about the size limit: https://matthewmoisen.com/blog/how-to-download-a-csv-file-in-flask/. I don’t see an easy way to rig up a callback to use this approach, but I think it’s not too hard to implement as part of Dash DataTable. I could assist, if helpful.

2 Likes

Yeah, I think we’ll include this in our new version of the data table. Alternatively, there’s an issue about creating a first-class download component: https://github.com/plotly/dash-core-components/issues/216