See what you make of this...
Below is a working flow - showing you how to download a CSV file (without actually saving it - i.e. straight from a database)...
[{"id":"44c05d20.061c54","type":"csv","z":"5a19214e.b8927","name":"","sep":",","hdrin":"","hdrout":true,"multi":"mult","ret":"\\r\\n","temp":"ID_and_s,V_izq,V_der,F_izq,F_der,tiempo_mili,timestamp","skip":"0","strings":false,"x":630,"y":260,"wires":[["8dc0605f.24598"]]},{"id":"34a65b72.79dea4","type":"http response","z":"5a19214e.b8927","name":"","statusCode":"","headers":{},"x":1010,"y":260,"wires":[]},{"id":"7239ac2b.0780d4","type":"catch","z":"5a19214e.b8927","name":"","scope":null,"uncaught":false,"x":240,"y":320,"wires":[["77f0bc63.66e014","36eadc67.10b2c4"]]},{"id":"77f0bc63.66e014","type":"function","z":"5a19214e.b8927","name":"Set 404","func":"msg.payload = msg.error;\nmsg.statusCode = 404;//resource not found\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":320,"wires":[["34a65b72.79dea4"]]},{"id":"36eadc67.10b2c4","type":"debug","z":"5a19214e.b8927","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":270,"y":380,"wires":[]},{"id":"1bf4dcb6.c14383","type":"ui_template","z":"5a19214e.b8927","group":"754a23fa.82988c","name":"ui_temlplate - present download link on dashboard","order":0,"width":0,"height":0,"format":"<div >\n <a href=\"/data\">HAZ CLICK PARA DESCARGAR</a>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":610,"y":380,"wires":[[]]},{"id":"f5c7c9b1.bdf808","type":"http in","z":"5a19214e.b8927","name":"","url":"/data","method":"get","upload":false,"swaggerDoc":"","x":240,"y":260,"wires":[["20cff092.556bc"]]},{"id":"20cff092.556bc","type":"function","z":"5a19214e.b8927","name":"** Database Call **","func":"msg.payload =[{\"ID_and_s\":1,\"V_izq\":66,\"V_der\":10,\"F_izq\":130,\"F_der\":109,\"tiempo_mili\":1597228949544,\"timestamp\":\"2020-08-12T10:42:29.000Z\"},{\"ID_and_s\":1,\"V_izq\":66,\"V_der\":10,\"F_izq\":62,\"F_der\":109,\"tiempo_mili\":1597228949544,\"timestamp\":\"2020-08-12T10:42:29.000Z\"},{\"ID_and_s\":1,\"V_izq\":58,\"V_der\":10,\"F_izq\":62,\"F_der\":109,\"tiempo_mili\":1597228949547,\"timestamp\":\"2020-08-12T10:42:29.000Z\"},{\"ID_and_s\":1,\"V_izq\":58,\"V_der\":10,\"F_izq\":62,\"F_der\":68,\"tiempo_mili\":1597228949687,\"timestamp\":\"2020-08-12T10:42:29.000Z\"},{\"ID_and_s\":1,\"V_izq\":58,\"V_der\":10,\"F_izq\":62,\"F_der\":45,\"tiempo_mili\":1597228950690,\"timestamp\":\"2020-08-12T10:42:30.000Z\"},{\"ID_and_s\":1,\"V_izq\":58,\"V_der\":10,\"F_izq\":62,\"F_der\":45,\"tiempo_mili\":1597228951545,\"timestamp\":\"2020-08-12T10:42:31.000Z\"},{\"ID_and_s\":1,\"V_izq\":58,\"V_der\":10,\"F_izq\":58,\"F_der\":45,\"tiempo_mili\":1597228951546,\"timestamp\":\"2020-08-12T10:42:31.000Z\"},{\"ID_and_s\":1,\"V_izq\":22,\"V_der\":10,\"F_izq\":58,\"F_der\":45,\"tiempo_mili\":1597228951548,\"timestamp\":\"2020-08-12T10:42:31.000Z\"},{\"ID_and_s\":1,\"V_izq\":22,\"V_der\":10,\"F_izq\":58,\"F_der\":83,\"tiempo_mili\":1597228951692,\"timestamp\":\"2020-08-12T10:42:31.000Z\"},{\"ID_and_s\":1,\"V_izq\":22,\"V_der\":10,\"F_izq\":58,\"F_der\":73,\"tiempo_mili\":1597228952695,\"timestamp\":\"2020-08-12T10:42:32.000Z\"},{\"ID_and_s\":1,\"V_izq\":22,\"V_der\":10,\"F_izq\":58,\"F_der\":73,\"tiempo_mili\":1597228953548,\"timestamp\":\"2020-08-12T10:42:33.000Z\"},{\"ID_and_s\":1,\"V_izq\":22,\"V_der\":10,\"F_izq\":79,\"F_der\":73,\"tiempo_mili\":1597228953548,\"timestamp\":\"2020-08-12T10:42:33.000Z\"},{\"ID_and_s\":1,\"V_izq\":97,\"V_der\":10,\"F_izq\":79,\"F_der\":73,\"tiempo_mili\":1597228953550,\"timestamp\":\"2020-08-12T10:42:33.000Z\"},{\"ID_and_s\":1,\"V_izq\":97,\"V_der\":10,\"F_izq\":79,\"F_der\":114,\"tiempo_mili\":1597228953696,\"timestamp\":\"2020-08-12T10:42:33.000Z\"},{\"ID_and_s\":1,\"V_izq\":97,\"V_der\":10,\"F_izq\":79,\"F_der\":126,\"tiempo_mili\":1597228954701,\"timestamp\":\"2020-08-12T10:42:34.000Z\"},{\"ID_and_s\":1,\"V_izq\":97,\"V_der\":10,\"F_izq\":79,\"F_der\":126,\"tiempo_mili\":1597228955549,\"timestamp\":\"2020-08-12T10:42:35.000Z\"},{\"ID_and_s\":1,\"V_izq\":97,\"V_der\":10,\"F_izq\":124,\"F_der\":126,\"tiempo_mili\":1597228955550,\"timestamp\":\"2020-08-12T10:42:35.000Z\"},{\"ID_and_s\":1,\"V_izq\":68,\"V_der\":10,\"F_izq\":124,\"F_der\":126,\"tiempo_mili\":1597228955552,\"timestamp\":\"2020-08-12T10:42:35.000Z\"},{\"ID_and_s\":1,\"V_izq\":68,\"V_der\":10,\"F_izq\":124,\"F_der\":101,\"tiempo_mili\":1597228955702,\"timestamp\":\"2020-08-12T10:42:35.000Z\"},{\"ID_and_s\":1,\"V_izq\":68,\"V_der\":10,\"F_izq\":124,\"F_der\":69,\"tiempo_mili\":1597228956706,\"timestamp\":\"2020-08-12T10:42:36.000Z\"},{\"ID_and_s\":1,\"V_izq\":68,\"V_der\":10,\"F_izq\":124,\"F_der\":69,\"tiempo_mili\":1597228957553,\"timestamp\":\"2020-08-12T10:42:37.000Z\"},{\"ID_and_s\":1,\"V_izq\":68,\"V_der\":10,\"F_izq\":57,\"F_der\":69,\"tiempo_mili\":1597228957555,\"timestamp\":\"2020-08-12T10:42:37.000Z\"},{\"ID_and_s\":1,\"V_izq\":144,\"V_der\":10,\"F_izq\":57,\"F_der\":69,\"tiempo_mili\":1597228957556,\"timestamp\":\"2020-08-12T10:42:37.000Z\"},{\"ID_and_s\":1,\"V_izq\":144,\"V_der\":10,\"F_izq\":57,\"F_der\":31,\"tiempo_mili\":1597228957707,\"timestamp\":\"2020-08-12T10:42:37.000Z\"},{\"ID_and_s\":1,\"V_izq\":144,\"V_der\":10,\"F_izq\":57,\"F_der\":121,\"tiempo_mili\":1597228958710,\"timestamp\":\"2020-08-12T10:42:38.000Z\"},{\"ID_and_s\":1,\"V_izq\":144,\"V_der\":10,\"F_izq\":57,\"F_der\":121,\"tiempo_mili\":1597228959554,\"timestamp\":\"2020-08-12T10:42:39.000Z\"},{\"ID_and_s\":1,\"V_izq\":144,\"V_der\":10,\"F_izq\":94,\"F_der\":121,\"tiempo_mili\":1597228959556,\"timestamp\":\"2020-08-12T10:42:39.000Z\"},{\"ID_and_s\":1,\"V_izq\":49,\"V_der\":10,\"F_izq\":94,\"F_der\":121,\"tiempo_mili\":1597228959556,\"timestamp\":\"2020-08-12T10:42:39.000Z\"},{\"ID_and_s\":1,\"V_izq\":49,\"V_der\":10,\"F_izq\":94,\"F_der\":144,\"tiempo_mili\":1597228959712,\"timestamp\":\"2020-08-12T10:42:39.000Z\"},{\"ID_and_s\":1,\"V_izq\":49,\"V_der\":10,\"F_izq\":94,\"F_der\":49,\"tiempo_mili\":1597228960715,\"timestamp\":\"2020-08-12T10:42:40.000Z\"},{\"ID_and_s\":1,\"V_izq\":49,\"V_der\":10,\"F_izq\":94,\"F_der\":49,\"tiempo_mili\":1597228961556,\"timestamp\":\"2020-08-12T10:42:41.000Z\"},{\"ID_and_s\":1,\"V_izq\":49,\"V_der\":10,\"F_izq\":112,\"F_der\":49,\"tiempo_mili\":1597228961558,\"timestamp\":\"2020-08-12T10:42:41.000Z\"},{\"ID_and_s\":1,\"V_izq\":102,\"V_der\":10,\"F_izq\":112,\"F_der\":49,\"tiempo_mili\":1597228961558,\"timestamp\":\"2020-08-12T10:42:41.000Z\"},{\"ID_and_s\":1,\"V_izq\":102,\"V_der\":10,\"F_izq\":112,\"F_der\":106,\"tiempo_mili\":1597228961715,\"timestamp\":\"2020-08-12T10:42:41.000Z\"},{\"ID_and_s\":1,\"V_izq\":102,\"V_der\":10,\"F_izq\":112,\"F_der\":77,\"tiempo_mili\":1597228962720,\"timestamp\":\"2020-08-12T10:42:42.000Z\"},{\"ID_and_s\":1,\"V_izq\":102,\"V_der\":10,\"F_izq\":112,\"F_der\":77,\"tiempo_mili\":1597228963557,\"timestamp\":\"2020-08-12T10:42:43.000Z\"},{\"ID_and_s\":1,\"V_izq\":102,\"V_der\":10,\"F_izq\":50,\"F_der\":77,\"tiempo_mili\":1597228963557,\"timestamp\":\"2020-08-12T10:42:43.000Z\"},{\"ID_and_s\":1,\"V_izq\":90,\"V_der\":10,\"F_izq\":50,\"F_der\":77,\"tiempo_mili\":1597228963559,\"timestamp\":\"2020-08-12T10:42:43.000Z\"},{\"ID_and_s\":1,\"V_izq\":90,\"V_der\":10,\"F_izq\":50,\"F_der\":121,\"tiempo_mili\":1597228963721,\"timestamp\":\"2020-08-12T10:42:43.000Z\"},{\"ID_and_s\":1,\"V_izq\":90,\"V_der\":10,\"F_izq\":50,\"F_der\":133,\"tiempo_mili\":1597228964725,\"timestamp\":\"2020-08-12T10:42:44.000Z\"},{\"ID_and_s\":1,\"V_izq\":90,\"V_der\":10,\"F_izq\":50,\"F_der\":133,\"tiempo_mili\":1597228965559,\"timestamp\":\"2020-08-12T10:42:45.000Z\"},{\"ID_and_s\":1,\"V_izq\":90,\"V_der\":10,\"F_izq\":122,\"F_der\":133,\"tiempo_mili\":1597228965559,\"timestamp\":\"2020-08-12T10:42:45.000Z\"},{\"ID_and_s\":1,\"V_izq\":124,\"V_der\":10,\"F_izq\":122,\"F_der\":133,\"tiempo_mili\":1597228965561,\"timestamp\":\"2020-08-12T10:42:45.000Z\"},{\"ID_and_s\":1,\"V_izq\":124,\"V_der\":10,\"F_izq\":122,\"F_der\":118,\"tiempo_mili\":1597228965726,\"timestamp\":\"2020-08-12T10:42:45.000Z\"},{\"ID_and_s\":1,\"V_izq\":124,\"V_der\":10,\"F_izq\":122,\"F_der\":42,\"tiempo_mili\":1597228966730,\"timestamp\":\"2020-08-12T10:42:46.000Z\"},{\"ID_and_s\":1,\"V_izq\":124,\"V_der\":10,\"F_izq\":122,\"F_der\":42,\"tiempo_mili\":1597228967561,\"timestamp\":\"2020-08-12T10:42:47.000Z\"},{\"ID_and_s\":1,\"V_izq\":124,\"V_der\":10,\"F_izq\":135,\"F_der\":42,\"tiempo_mili\":1597228967561,\"timestamp\":\"2020-08-12T10:42:47.000Z\"},{\"ID_and_s\":1,\"V_izq\":111,\"V_der\":10,\"F_izq\":135,\"F_der\":42,\"tiempo_mili\":1597228967563,\"timestamp\":\"2020-08-12T10:42:47.000Z\"},{\"ID_and_s\":1,\"V_izq\":111,\"V_der\":10,\"F_izq\":135,\"F_der\":118,\"tiempo_mili\":1597228967733,\"timestamp\":\"2020-08-12T10:42:47.000Z\"},{\"ID_and_s\":1,\"V_izq\":111,\"V_der\":10,\"F_izq\":135,\"F_der\":62,\"tiempo_mili\":1597228968736,\"timestamp\":\"2020-08-12T10:42:48.000Z\"},{\"ID_and_s\":1,\"V_izq\":111,\"V_der\":10,\"F_izq\":135,\"F_der\":62,\"tiempo_mili\":1597228969563,\"timestamp\":\"2020-08-12T10:42:49.000Z\"},{\"ID_and_s\":1,\"V_izq\":111,\"V_der\":10,\"F_izq\":68,\"F_der\":62,\"tiempo_mili\":1597228969563,\"timestamp\":\"2020-08-12T10:42:49.000Z\"},{\"ID_and_s\":1,\"V_izq\":79,\"V_der\":10,\"F_izq\":68,\"F_der\":62,\"tiempo_mili\":1597228969565,\"timestamp\":\"2020-08-12T10:42:49.000Z\"},{\"ID_and_s\":1,\"V_izq\":79,\"V_der\":10,\"F_izq\":68,\"F_der\":53,\"tiempo_mili\":1597228969737,\"timestamp\":\"2020-08-12T10:42:49.000Z\"},{\"ID_and_s\":1,\"V_izq\":79,\"V_der\":10,\"F_izq\":68,\"F_der\":56,\"tiempo_mili\":1597228970741,\"timestamp\":\"2020-08-12T10:42:50.000Z\"},{\"ID_and_s\":1,\"V_izq\":79,\"V_der\":10,\"F_izq\":68,\"F_der\":56,\"tiempo_mili\":1597228971564,\"timestamp\":\"2020-08-12T10:42:51.000Z\"},{\"ID_and_s\":1,\"V_izq\":79,\"V_der\":10,\"F_izq\":131,\"F_der\":56,\"tiempo_mili\":1597228971565,\"timestamp\":\"2020-08-12T10:42:51.000Z\"},{\"ID_and_s\":1,\"V_izq\":34,\"V_der\":10,\"F_izq\":131,\"F_der\":56,\"tiempo_mili\":1597228971589,\"timestamp\":\"2020-08-12T10:42:51.000Z\"},{\"ID_and_s\":1,\"V_izq\":34,\"V_der\":10,\"F_izq\":131,\"F_der\":83,\"tiempo_mili\":1597228971743,\"timestamp\":\"2020-08-12T10:42:51.000Z\"},{\"ID_and_s\":1,\"V_izq\":34,\"V_der\":10,\"F_izq\":131,\"F_der\":61,\"tiempo_mili\":1597228972747,\"timestamp\":\"2020-08-12T10:42:52.000Z\"},{\"ID_and_s\":1,\"V_izq\":34,\"V_der\":10,\"F_izq\":131,\"F_der\":61,\"tiempo_mili\":1597228973569,\"timestamp\":\"2020-08-12T10:42:53.000Z\"},{\"ID_and_s\":1,\"V_izq\":34,\"V_der\":10,\"F_izq\":115,\"F_der\":61,\"tiempo_mili\":1597228973569,\"timestamp\":\"2020-08-12T10:42:53.000Z\"},{\"ID_and_s\":1,\"V_izq\":95,\"V_der\":10,\"F_izq\":115,\"F_der\":61,\"tiempo_mili\":1597228973573,\"timestamp\":\"2020-08-12T10:42:53.000Z\"},{\"ID_and_s\":1,\"V_izq\":95,\"V_der\":10,\"F_izq\":115,\"F_der\":53,\"tiempo_mili\":1597228973750,\"timestamp\":\"2020-08-12T10:42:53.000Z\"},{\"ID_and_s\":1,\"V_izq\":95,\"V_der\":10,\"F_izq\":115,\"F_der\":44,\"tiempo_mili\":1597228974752,\"timestamp\":\"2020-08-12T10:42:54.000Z\"}]\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":260,"wires":[["44c05d20.061c54"]]},{"id":"8dc0605f.24598","type":"function","z":"5a19214e.b8927","name":"Set Headers","func":"msg.headers = {}\nmsg.headers[\"Content-type\"] = \"text/csv\";\nmsg.headers[\"Content-Disposition\"] = \"attachment; filename=data.csv\";\nmsg.headers[\"Pragma\"] = \"no-cache\";\nmsg.headers[\"Expires\"] = \"0\";\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":260,"wires":[["34a65b72.79dea4"]]},{"id":"ee46742a.c9c988","type":"comment","z":"5a19214e.b8927","name":"Replace \"Database Call\" with your database calls like i detailed in the screenshot on the forum","info":"","x":560,"y":200,"wires":[]},{"id":"754a23fa.82988c","type":"ui_group","z":"","name":"DESCARGAR DATOS A EXCEL:","tab":"be2f7523.3a90c8","order":4,"disp":true,"width":"12","collapse":false},{"id":"be2f7523.3a90c8","type":"ui_tab","z":"","name":"DESCARGAR DATOS","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
You will need to integrate this with your database calls - as I describe in the screen shot comments.