Generating a report and performing download on Download button click

Hi

The st.download_button would perform 1 thing which is to download the provided file. However, if you’d like it to do some pre-processing (like generating the report) followed by downloading the report, then you’ll need a custom button.

Please see this previous post with example code snippet that you can customize for your use case:

Hope this helps!

1 Like