# Download uitable

**URL:** https://discourse.nodered.org/t/download-uitable/75776
**Category:** General
**Created:** [26 February 2023 22:37 UTC](https://discourse.nodered.org/t/download-uitable/75776 "2023-02-26T22:37:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tenziki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tenziki/32/76628_2.png) [@tenziki](https://discourse.nodered.org/u/tenziki)
#### Post date: [26 February 2023 22:37 UTC](https://discourse.nodered.org/t/download-uitable/75776/1 "2023-02-26T22:37:56Z")

</div>

How do I download this ui table in csv  
I am using node-red ui table

Below is the flow, click inject timestamp to inject table data

```auto
[
    {
        "id": "758b47d77078d14e",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6c1e8c2ff814d53b",
        "type": "junction",
        "z": "758b47d77078d14e",
        "x": 1135.5078125,
        "y": 240.5234375,
        "wires": [
            []
        ]
    },
    {
        "id": "4bddba03ed588b14",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    },
    {
        "id": "19bfae636033fa2a",
        "type": "ui_group",
        "name": "Default",
        "tab": "4bddba03ed588b14",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e68fcfd07d233151",
        "type": "inject",
        "z": "758b47d77078d14e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 580,
        "y": 240,
        "wires": [
            [
                "f0d7239424d59422"
            ]
        ]
    },
    {
        "id": "f0d7239424d59422",
        "type": "function",
        "z": "758b47d77078d14e",
        "name": "function 1",
        "func": "msg.payload = [\n {\n \"Name\": \"Kazuhito Yokoi\",\n \"Age\": \"35\",\n \"Favourite Color\": \"red\",\n \"Date Of Birth\": \"12/09/1983\"\n },\n {\n \"Name\": \"Oli Bob\",\n \"Age\": \"12\",\n \"Favourite Color\": \"cyan\",\n \"Date Of Birth\": \"12/08/2017\"\n }\n];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 740,
        "y": 240,
        "wires": [
            [
                "36237ab869efb9e9"
            ]
        ]
    },
    {
        "id": "36237ab869efb9e9",
        "type": "ui_table",
        "z": "758b47d77078d14e",
        "group": "19bfae636033fa2a",
        "name": "table",
        "order": 0,
        "width": "4",
        "height": "3",
        "columns": [],
        "outputs": 1,
        "cts": true,
        "x": 1180,
        "y": 240,
        "wires": [
            [
                "867f55192d7b8e1b"
            ]
        ]
    },
    {
        "id": "867f55192d7b8e1b",
        "type": "ui_button",
        "z": "758b47d77078d14e",
        "name": "",
        "group": "19bfae636033fa2a",
        "order": 14,
        "width": "4",
        "height": "1",
        "passthru": false,
        "label": "Download",
        "tooltip": "click to download",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "{\"command\":\"download\",\"arguments\":[\"csv\",\"table.csv\",{\"delimiter\":\";\"}],\"returnPromise\":false}",
        "payloadType": "json",
        "topic": "",
        "topicType": "str",
        "x": 1350,
        "y": 240,
        "wires": [
            []
        ]
    }
]

```

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [26 February 2023 23:35 UTC](https://discourse.nodered.org/t/download-uitable/75776/2 "2023-02-26T23:35:48Z")

</div>

Please don't open duplicate threads. This is the same as [Trying to download UI table in csv format - #3 by tenziki](https://discourse.nodered.org/t/trying-to-download-ui-table-in-csv-format/75654/3)

I will be closing this thread.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [26 February 2023 23:35 UTC](https://discourse.nodered.org/t/download-uitable/75776/3 "2023-02-26T23:35:53Z")

</div>



---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [27 February 2023 01:13 UTC](https://discourse.nodered.org/t/download-uitable/75776/4 "2023-02-27T01:13:36Z")

</div>



---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [27 February 2023 01:16 UTC](https://discourse.nodered.org/t/download-uitable/75776/5 "2023-02-27T01:16:26Z")

</div>

I've reopened this thread at @tenziki request and closed the older thread.

Try this, import this node

```auto
[{"id":"3174e50e97f2069c","type":"function","z":"758b47d77078d14e","name":"setup download","func":"msg.payload = {\n \"command\": \"download\",\n \"arguments\": [\n \"csv\",\n \"table.csv\",\n {\n \"delimiter\": \";\"\n }\n],\n \"returnPromise\": false\n}\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"_mcu":{"mcu":false},"x":140,"y":220,"wires":[["36237ab869efb9e9"]]}]

```

feed the output of the `button` node to this `function` node and then feed the output of the `function` node to the `ui-table` node. Deploy and test.
