# Module to download csv file - Is there anything better than this "hack"?

**URL:** <https://discuss.streamlit.io/t/module-to-download-csv-file-is-there-anything-better-than-this-hack/3757>\
**Category:** Using Streamlit\
**Tags:** file-download\
**Created:** [June 24, 2020, 1:57pm UTC](https://discuss.streamlit.io/t/module-to-download-csv-file-is-there-anything-better-than-this-hack/3757 "2020-06-24T13:57:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [June 25, 2020, 12:41pm UTC](https://discuss.streamlit.io/t/module-to-download-csv-file-is-there-anything-better-than-this-hack/3757/2 "2020-06-25T12:41:17Z")

</div>

Hey Charly -

Right now, there isn’t a widget for doing this, but you can avoid having to make the user do anything using the code in this post:

> [@How to download file in streamlit](https://discuss.streamlit.io/t/how-to-download-file-in-streamlit/1806/10):
>
> Adding the ‘download’ tag attribute as shown below allows you to provide a file name and extension. f'\<a href="data:file/csv;base64,{b64}" download="myfilename.csv"\>Download csv file\</a\>'

---

_[View the full topic](https://discuss.streamlit.io/t/module-to-download-csv-file-is-there-anything-better-than-this-hack/3757)._
