# Save to CSV or TXT - UI Table

**URL:** <https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915>\
**Category:** General\
**Created:** [30 March 2020 17:07 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915 "2020-03-30T17:07:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zox2005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zox2005/32/19008_2.png) [@zox2005](https://discourse.nodered.org/u/zox2005)\
**Post date:** [30 March 2020 17:07 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/1 "2020-03-30T17:07:26Z")

</div>

Hi,

i have ui table populated with 10 records. I found on tabultaor web site that tables can have options for export / save file to PC.

I can not find how can i add this option to node-red. If this option is not available, is there any other option to save records to cvs or txt.

I have same records in mysql database so i can also grab them from there.

Thank you

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [30 March 2020 18:51 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/2 "2020-03-30T18:51:56Z")

</div>

You can use the file node in conjunction with the csv node to do exactly that. You just need to format the data in a function node or something beforehand.  
What format does your data have when you read it from your database into nodered?

---

<div class="post-metadata">

**Author:** ![zox2005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zox2005/32/19008_2.png) [@zox2005](https://discourse.nodered.org/u/zox2005)\
**Post date:** [30 March 2020 19:01 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/3 "2020-03-30T19:01:12Z")

</div>

I create in this way. From mqtt to mysql database for backup.  
Then from mqtt to ui table where i preview current readings.

I need from current reading to csv. So i can read direct from table or from mysql.  
I will try to find solution how to use csv node, i never use it till now.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [30 March 2020 19:02 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/4 "2020-03-30T19:02:46Z")

</div>

you need to use it connected to a file node to write a new csv.  
Johannes

---

<div class="post-metadata">

**Author:** ![zox2005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zox2005/32/19008_2.png) [@zox2005](https://discourse.nodered.org/u/zox2005)\
**Post date:** [30 March 2020 19:19 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/5 "2020-03-30T19:19:31Z")

</div>

Thank you i did not know that. I success with that part, now i must just set path where file will be saved.

Is there any option when i click on button to read data via mqtt, then csv file and automatically ready for download. (i get pop-up like when i click on download link)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 April 2020 19:19 UTC](https://discourse.nodered.org/t/save-to-csv-or-txt-ui-table/23915/6 "2020-04-13T19:19:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
