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?
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.
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)