Dash Ag Grid File Export Location

Hello,

I am trying to add an export csv button to download the Ag Grid displayed in my app. While it does work locally, the way it functions is that it downloads the file to the default location, rather than prompting the file browser where a user can choose where to save the file to. Is there an option/parameter somewhere which can trigger file browser and allow users to export the csv to a chosen location in the system?

Hello @vsathwikm,

It should be working as this is driven by the users browser and what they have setup as far as downloading of the files. I’m not sure you can control this. And just glancing at it, it looks like you can’t.

@jinnyzor

Thank you for this. So is the Ag Grid dependent on/built using Papaparse js library?

My issue actually is that the plotly dash app that I built which contains the Ag Grid component is deployed on a server/docker container. Looks like because of containerization, the file gets downloaded to the container rather than the local storage of the user who might access the hosted app. So changing the download location settings in browser still doesn’t help in this case.

@vsathwikm,

The normal interface to download from the grid refers to the ability for a user to download the information from the browser. In this case, the browser will take the user settings.

It sounds like you are referring to saving data onto the server, this will only save onto the particular server in which it is hosted.

You can however use the first version to allow the user to download the data from the grid directly, or from a dcc.Download.

To save a file to a specific location on the server but also be shared, then you will need to use SMB and a shared network drive. Also, the container must have the proper permissions, etc.

Ya. I had to change my browser settings to specifically bring up the file browser and I guess that is what end user’s have to turn on in their browsers.

1 Like