# When Excel report is generated both tag value not come in same row, I am very new and sorry for my bad english...please support

**URL:** https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819
**Category:** General
**Created:** [5 February 2022 09:21 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819 "2022-02-05T09:21:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jitesh](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jitesh](https://discourse.nodered.org/u/jitesh)
#### Post date: [5 February 2022 09:21 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/1 "2022-02-05T09:21:15Z")

</div>

[  
{  
"id": "6565a887b9e27bb2",  
"type": "tab",  
"label": "Flow 3",  
"disabled": false,  
"info": ""  
},  
{  
"id": "eea9b78c503b9a85",  
"type": "function",  
"z": "6565a887b9e27bb2",  
"name": "Filename generator",  
"func": "// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() \< 9 ? "0" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() \< 10 ? "0" + now.getDate() : now.getDate();\nvar hh = now.getHours() \< 10 ? "0" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() \< 10 ? "0" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() \< 10 ? "0" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = "maplin\_"+ dd + mm + yyyy + ".csv";\n// Full filename with path for the file node later\nmsg.filename = "/home/pi/datalog/"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {"pattern":msg.fname};\n\nnode.status({fill:"blue",shape:"ring",text:msg.fname});\nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 170,  
"y": 200,  
"wires": [  
[  
"66e04245bd7f5aca"  
]  
]  
},  
{  
"id": "66e04245bd7f5aca",  
"type": "fs-file-lister",  
"z": "6565a887b9e27bb2",  
"name": "",  
"start": "/home/pi/datalog/",  
"pattern": "",  
"folders": "\*",  
"hidden": true,  
"lstype": "files",  
"path": true,  
"single": true,  
"depth": 0,  
"stat": true,  
"showWarnings": false,  
"x": 360,  
"y": 200,  
"wires": [  
[  
"fa429e0ed8d04381",  
"e40cf8a373ca74f0"  
]  
]  
},  
{  
"id": "fa429e0ed8d04381",  
"type": "debug",  
"z": "6565a887b9e27bb2",  
"name": "",  
"active": true,  
"tosidebar": true,  
"console": false,  
"tostatus": true,  
"complete": "payload",  
"targetType": "msg",  
"statusVal": "payload",  
"statusType": "auto",  
"x": 530,  
"y": 100,  
"wires":   
},  
{  
"id": "e40cf8a373ca74f0",  
"type": "switch",  
"z": "6565a887b9e27bb2",  
"name": "",  
"property": "$count(msg.payload)",  
"propertyType": "jsonata",  
"rules": [  
{  
"t": "eq",  
"v": "0",  
"vt": "num"  
},  
{  
"t": "else"  
}  
],  
"checkall": "true",  
"repair": false,  
"outputs": 2,  
"x": 510,  
"y": 200,  
"wires": [  
[  
"e8daeb3af7220a1b"  
],  
[  
"5ed750fb056c5df3"  
]  
]  
},  
{  
"id": "fe9d77b4f7c5e330",  
"type": "csv",  
"z": "6565a887b9e27bb2",  
"name": "",  
"sep": ",",  
"hdrin": false,  
"hdrout": "all",  
"multi": "one",  
"ret": "\n",  
"temp": "timestamp,temperature,humidity",  
"skip": "0",  
"strings": true,  
"include\_empty\_strings": false,  
"include\_null\_values": false,  
"x": 850,  
"y": 180,  
"wires": [  
[  
"d426858ecf042060"  
]  
]  
},  
{  
"id": "d426858ecf042060",  
"type": "file",  
"z": "6565a887b9e27bb2",  
"name": "",  
"filename": "",  
"appendNewline": false,  
"createDir": true,  
"overwriteFile": "false",  
"encoding": "none",  
"x": 1010,  
"y": 180,  
"wires": [  
  
]  
},  
{  
"id": "8b34b7f277503825",  
"type": "csv",  
"z": "6565a887b9e27bb2",  
"name": "",  
"sep": ",",  
"hdrin": "",  
"hdrout": "none",  
"multi": "one",  
"ret": "\n",  
"temp": "timestamp,temperature,humidity",  
"skip": "0",  
"strings": true,  
"x": 850,  
"y": 220,  
"wires": [  
[  
"d426858ecf042060"  
]  
]  
},  
{  
"id": "e8daeb3af7220a1b",  
"type": "change",  
"z": "6565a887b9e27bb2",  
"name": "Get file content",  
"rules": [  
{  
"t": "set",  
"p": "payload",  
"pt": "msg",  
"to": "filecontent",  
"tot": "msg"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 680,  
"y": 180,  
"wires": [  
[  
"fe9d77b4f7c5e330"  
]  
]  
},  
{  
"id": "5ed750fb056c5df3",  
"type": "change",  
"z": "6565a887b9e27bb2",  
"name": "Get file content",  
"rules": [  
{  
"t": "set",  
"p": "payload",  
"pt": "msg",  
"to": "filecontent",  
"tot": "msg"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 680,  
"y": 220,  
"wires": [  
[  
"8b34b7f277503825"  
]  
]  
},  
{  
"id": "2d077b4796ad0818",  
"type": "function",  
"z": "6565a887b9e27bb2",  
"name": "Set data",  
"func": "var now = new Date();\n\nmsg.payload = {\n "timestamp" : now.toLocaleTimeString(),\n "temperature" : msg.FLOW,\n "humidity" : msg.LEVEL\n}\nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 160,  
"y": 300,  
"wires": [  
[  
"eea9b78c503b9a85"  
]  
]  
},  
{  
"id": "c1ec9682493b9ef2",  
"type": "function",  
"z": "6565a887b9e27bb2",  
"name": "",  
"func": "msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 280,  
"y": 460,  
"wires": [  
[  
"1b23fcc0de424eb8"  
]  
]  
},  
{  
"id": "1b23fcc0de424eb8",  
"type": "modbus-flex-getter",  
"z": "6565a887b9e27bb2",  
"name": "",  
"showStatusActivities": false,  
"showErrors": false,  
"logIOActivities": false,  
"server": "8c89c617315aba69",  
"useIOFile": false,  
"ioFile": "",  
"useIOForPayload": false,  
"emptyMsgOnFail": false,  
"keepMsgProperties": false,  
"x": 470,  
"y": 460,  
"wires": [  
[  
"f75070de6ebc675b",  
"81b46f9f4174485c"  
],  
  
]  
},  
{  
"id": "3c8c211e96686b93",  
"type": "inject",  
"z": "6565a887b9e27bb2",  
"name": "",  
"props": [  
{  
"p": "payload"  
},  
{  
"p": "topic",  
"vt": "str"  
}  
],  
"repeat": "60",  
"crontab": "",  
"once": false,  
"onceDelay": "60",  
"topic": "",  
"payloadType": "date",  
"x": 110,  
"y": 460,  
"wires": [  
[  
"c1ec9682493b9ef2"  
]  
],  
"info": "ACC Automation Sample Code"  
},  
{  
"id": "f75070de6ebc675b",  
"type": "function",  
"z": "6565a887b9e27bb2",  
"name": "",  
"func": "msg.payload = [msg.payload[4],msg.payload[3]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 680,  
"y": 460,  
"wires": [  
[  
"55b2640dc330c397"  
]  
]  
},  
{  
"id": "55b2640dc330c397",  
"type": "change",  
"z": "6565a887b9e27bb2",  
"name": "",  
"rules": [  
{  
"t": "move",  
"p": "payload",  
"pt": "msg",  
"to": "FLOW",  
"tot": "msg"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 870,  
"y": 460,  
"wires": [  
[  
"2d077b4796ad0818"  
]  
]  
},  
{  
"id": "81b46f9f4174485c",  
"type": "function",  
"z": "6565a887b9e27bb2",  
"name": "",  
"func": "msg.payload = [msg.payload[24],msg.payload[23]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",  
"outputs": 1,  
"noerr": 0,  
"initialize": "",  
"finalize": "",  
"libs": ,  
"x": 680,  
"y": 500,  
"wires": [  
[  
"e29b9b4f1758b92c"  
]  
]  
},  
{  
"id": "e29b9b4f1758b92c",  
"type": "change",  
"z": "6565a887b9e27bb2",  
"name": "",  
"rules": [  
{  
"t": "move",  
"p": "payload",  
"pt": "msg",  
"to": "LEVEL",  
"tot": "msg"  
}  
],  
"action": "",  
"property": "",  
"from": "",  
"to": "",  
"reg": false,  
"x": 870,  
"y": 500,  
"wires": [  
[  
"2d077b4796ad0818"  
]  
]  
},  
{  
"id": "8c89c617315aba69",  
"type": "modbus-client",  
"name": "LOCATION\_2",  
"clienttype": "tcp",  
"bufferCommands": false,  
"stateLogEnabled": false,  
"queueLogEnabled": false,  
"tcpHost": "103.62.95.175",  
"tcpPort": "502",  
"tcpType": "DEFAULT",  
"serialPort": "/dev/ttyUSB",  
"serialType": "RTU-BUFFERD",  
"serialBaudrate": "9600",  
"serialDatabits": "8",  
"serialStopbits": "1",  
"serialParity": "none",  
"serialConnectionDelay": "100",  
"serialAsciiResponseStartDelimiter": "",  
"unit\_id": "1",  
"commandDelay": "0",  
"clientTimeout": "1000",  
"reconnectOnTimeout": true,  
"reconnectTimeout": "2000",  
"parallelUnitIdsAllowed": false  
}  
]

 ![excel_file](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/05d6e316358fc3bd518b3ac1f11ef69661e440df.png)

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [5 February 2022 09:30 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/2 "2022-02-05T09:30:45Z")

</div>

Please edit your post and put the code between backticks:

````auto

```
your code
```

````

or use the code icon in the text editor:  
 ![Screenshot 2022-02-05 at 10.31.11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/9877917cf82ab6dde76f1473c67ba1802e738228.jpeg)

---

<div class="post-metadata">

### Author: ![jitesh](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jitesh](https://discourse.nodered.org/u/jitesh)
#### Post date: [5 February 2022 09:44 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/3 "2022-02-05T09:44:41Z")

</div>

thanks for reply . Please check my flow file code:

```auto
[
    {
        "id": "6565a887b9e27bb2",
        "type": "tab",
        "label": "Flow 3",
        "disabled": false,
        "info": ""
    },
    {
        "id": "eea9b78c503b9a85",
        "type": "function",
        "z": "6565a887b9e27bb2",
        "name": "Filename generator",
        "func": "// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = \"maplin_\"+ dd + mm + yyyy + \".csv\";\n// Full filename with path for the file node later\nmsg.filename = \"/home/pi/datalog/\"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {\"pattern\":msg.fname};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.fname});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 170,
        "y": 200,
        "wires": [
            [
                "66e04245bd7f5aca"
            ]
        ]
    },
    {
        "id": "66e04245bd7f5aca",
        "type": "fs-file-lister",
        "z": "6565a887b9e27bb2",
        "name": "",
        "start": "/home/pi/datalog/",
        "pattern": "",
        "folders": "*",
        "hidden": true,
        "lstype": "files",
        "path": true,
        "single": true,
        "depth": 0,
        "stat": true,
        "showWarnings": false,
        "x": 360,
        "y": 200,
        "wires": [
            [
                "fa429e0ed8d04381",
                "e40cf8a373ca74f0"
            ]
        ]
    },
    {
        "id": "fa429e0ed8d04381",
        "type": "debug",
        "z": "6565a887b9e27bb2",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 530,
        "y": 100,
        "wires": []
    },
    {
        "id": "e40cf8a373ca74f0",
        "type": "switch",
        "z": "6565a887b9e27bb2",
        "name": "",
        "property": "$count(msg.payload)",
        "propertyType": "jsonata",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 510,
        "y": 200,
        "wires": [
            [
                "e8daeb3af7220a1b"
            ],
            [
                "5ed750fb056c5df3"
            ]
        ]
    },
    {
        "id": "fe9d77b4f7c5e330",
        "type": "csv",
        "z": "6565a887b9e27bb2",
        "name": "",
        "sep": ",",
        "hdrin": false,
        "hdrout": "all",
        "multi": "one",
        "ret": "\\n",
        "temp": "timestamp,temperature,humidity",
        "skip": "0",
        "strings": true,
        "include_empty_strings": false,
        "include_null_values": false,
        "x": 850,
        "y": 180,
        "wires": [
            [
                "d426858ecf042060"
            ]
        ]
    },
    {
        "id": "d426858ecf042060",
        "type": "file",
        "z": "6565a887b9e27bb2",
        "name": "",
        "filename": "",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "false",
        "encoding": "none",
        "x": 1010,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "8b34b7f277503825",
        "type": "csv",
        "z": "6565a887b9e27bb2",
        "name": "",
        "sep": ",",
        "hdrin": "",
        "hdrout": "none",
        "multi": "one",
        "ret": "\\n",
        "temp": "timestamp,temperature,humidity",
        "skip": "0",
        "strings": true,
        "x": 850,
        "y": 220,
        "wires": [
            [
                "d426858ecf042060"
            ]
        ]
    },
    {
        "id": "e8daeb3af7220a1b",
        "type": "change",
        "z": "6565a887b9e27bb2",
        "name": "Get file content",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "filecontent",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 680,
        "y": 180,
        "wires": [
            [
                "fe9d77b4f7c5e330"
            ]
        ]
    },
    {
        "id": "5ed750fb056c5df3",
        "type": "change",
        "z": "6565a887b9e27bb2",
        "name": "Get file content",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "filecontent",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 680,
        "y": 220,
        "wires": [
            [
                "8b34b7f277503825"
            ]
        ]
    },
    {
        "id": "2d077b4796ad0818",
        "type": "function",
        "z": "6565a887b9e27bb2",
        "name": "Set data",
        "func": "var now = new Date();\n\nmsg.payload = {\n \"timestamp\" : now.toLocaleTimeString(),\n \"temperature\" : msg.FLOW,\n \"humidity\" : msg.LEVEL\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 160,
        "y": 300,
        "wires": [
            [
                "eea9b78c503b9a85"
            ]
        ]
    },
    {
        "id": "c1ec9682493b9ef2",
        "type": "function",
        "z": "6565a887b9e27bb2",
        "name": "",
        "func": "msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 280,
        "y": 460,
        "wires": [
            [
                "1b23fcc0de424eb8"
            ]
        ]
    },
    {
        "id": "1b23fcc0de424eb8",
        "type": "modbus-flex-getter",
        "z": "6565a887b9e27bb2",
        "name": "",
        "showStatusActivities": false,
        "showErrors": false,
        "logIOActivities": false,
        "server": "8c89c617315aba69",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": false,
        "keepMsgProperties": false,
        "x": 470,
        "y": 460,
        "wires": [
            [
                "f75070de6ebc675b",
                "81b46f9f4174485c"
            ],
            []
        ]
    },
    {
        "id": "3c8c211e96686b93",
        "type": "inject",
        "z": "6565a887b9e27bb2",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "60",
        "crontab": "",
        "once": false,
        "onceDelay": "60",
        "topic": "",
        "payloadType": "date",
        "x": 110,
        "y": 460,
        "wires": [
            [
                "c1ec9682493b9ef2"
            ]
        ],
        "info": "ACC Automation Sample Code"
    },
    {
        "id": "f75070de6ebc675b",
        "type": "function",
        "z": "6565a887b9e27bb2",
        "name": "",
        "func": "msg.payload = [msg.payload[4],msg.payload[3]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 460,
        "wires": [
            [
                "55b2640dc330c397"
            ]
        ]
    },
    {
        "id": "55b2640dc330c397",
        "type": "change",
        "z": "6565a887b9e27bb2",
        "name": "",
        "rules": [
            {
                "t": "move",
                "p": "payload",
                "pt": "msg",
                "to": "FLOW",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 870,
        "y": 460,
        "wires": [
            [
                "2d077b4796ad0818"
            ]
        ]
    },
    {
        "id": "81b46f9f4174485c",
        "type": "function",
        "z": "6565a887b9e27bb2",
        "name": "",
        "func": "msg.payload = [msg.payload[24],msg.payload[23]];\nlet pay = msg.payload;\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.payload = buf.readFloatBE(0).toFixed(2);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 500,
        "wires": [
            [
                "e29b9b4f1758b92c"
            ]
        ]
    },
    {
        "id": "e29b9b4f1758b92c",
        "type": "change",
        "z": "6565a887b9e27bb2",
        "name": "",
        "rules": [
            {
                "t": "move",
                "p": "payload",
                "pt": "msg",
                "to": "LEVEL",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 870,
        "y": 500,
        "wires": [
            [
                "2d077b4796ad0818"
            ]
        ]
    },
    {
        "id": "8c89c617315aba69",
        "type": "modbus-client",
        "name": "LOCATION_2",
        "clienttype": "tcp",
        "bufferCommands": false,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "tcpHost": "103.62.95.175",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "9600",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "100",
        "serialAsciiResponseStartDelimiter": "",
        "unit_id": "1",
        "commandDelay": "0",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": false
    }
]

```

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [5 February 2022 10:42 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/4 "2022-02-05T10:42:27Z")

</div>

After you flex getter node you spilt the msg. so now you have two messages each writting its own line.

You would be better keeping the flow on one wire  
eg.

```auto
[{"id":"2d077b4796ad0818","type":"function","z":"6565a887b9e27bb2","name":"Set data","func":"var now = new Date();\n\nmsg.payload = {\n \"timestamp\" : now.toLocaleTimeString(),\n \"temperature\" : msg.hold.one,\n \"humidity\" : msg.hold.two\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":160,"y":300,"wires":[["eea9b78c503b9a85"]]},{"id":"eea9b78c503b9a85","type":"function","z":"6565a887b9e27bb2","name":"Filename generator","func":"// Get the current time and convert it to text\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\n// Generate out file name pattern\nmsg.fname = \"maplin_\"+ dd + mm + yyyy + \".csv\";\n// Full filename with path for the file node later\nmsg.filename = \"/home/pi/datalog/\"+ msg.fname;\n\n// We save the current payload into a different place on the msg object\nmsg.filecontent = msg.payload;\n\n// We are passing the file name search pattern to fs node to tell us if the file exists or not\nmsg.payload = {\"pattern\":msg.fname};\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.fname});\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":200,"wires":[["66e04245bd7f5aca"]]},{"id":"7b352222.f800d4","type":"function","z":"6565a887b9e27bb2","name":"","func":"let pay = [msg.payload[24],msg.payload[23]];\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\n\nmsg.hold.two = buf.readFloatBE(0).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":810,"y":460,"wires":[["2d077b4796ad0818"]]},{"id":"66e04245bd7f5aca","type":"fs-file-lister","z":"6565a887b9e27bb2","name":"","start":"/home/pi/datalog/","pattern":"","folders":"*","hidden":true,"lstype":"files","path":true,"single":true,"depth":0,"stat":true,"showWarnings":false,"x":360,"y":200,"wires":[["fa429e0ed8d04381","e40cf8a373ca74f0"]]},{"id":"f75070de6ebc675b","type":"function","z":"6565a887b9e27bb2","name":"","func":"let pay = [msg.payload[4],msg.payload[3]];\n\nconst buf = Buffer.allocUnsafe(4);\nbuf.writeUInt16BE(pay[0],2);\nbuf.writeUInt16BE(pay[1],0);\nmsg.hold={};\nmsg.hold.one = buf.readFloatBE(0).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":460,"wires":[["7b352222.f800d4"]]},{"id":"fa429e0ed8d04381","type":"debug","z":"6565a887b9e27bb2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":530,"y":100,"wires":[]},{"id":"e40cf8a373ca74f0","type":"switch","z":"6565a887b9e27bb2","name":"","property":"$count(msg.payload)","propertyType":"jsonata","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":200,"wires":[["e8daeb3af7220a1b"],["5ed750fb056c5df3"]]},{"id":"1b23fcc0de424eb8","type":"modbus-flex-getter","z":"6565a887b9e27bb2","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"server":"8c89c617315aba69","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":470,"y":460,"wires":[["f75070de6ebc675b"],[]]},{"id":"e8daeb3af7220a1b","type":"change","z":"6565a887b9e27bb2","name":"Get file content","rules":[{"t":"set","p":"payload","pt":"msg","to":"filecontent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":180,"wires":[["fe9d77b4f7c5e330"]]},{"id":"5ed750fb056c5df3","type":"change","z":"6565a887b9e27bb2","name":"Get file content","rules":[{"t":"set","p":"payload","pt":"msg","to":"filecontent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":220,"wires":[["8b34b7f277503825"]]},{"id":"c1ec9682493b9ef2","type":"function","z":"6565a887b9e27bb2","name":"","func":"msg.payload = {\n 'fc': 3, \n 'unitid': 1, \n 'address': 100,\n 'quantity': 60 \n } \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":460,"wires":[["1b23fcc0de424eb8"]]},{"id":"fe9d77b4f7c5e330","type":"csv","z":"6565a887b9e27bb2","name":"","sep":",","hdrin":false,"hdrout":"all","multi":"one","ret":"\n","temp":"timestamp,temperature,humidity","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":850,"y":180,"wires":[["d426858ecf042060"]]},{"id":"8b34b7f277503825","type":"csv","z":"6565a887b9e27bb2","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\n","temp":"timestamp,temperature,humidity","skip":"0","strings":true,"x":850,"y":220,"wires":[["d426858ecf042060"]]},{"id":"3c8c211e96686b93","type":"inject","z":"6565a887b9e27bb2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":"60","topic":"","payloadType":"date","x":110,"y":460,"wires":[["c1ec9682493b9ef2"]],"info":"ACC Automation Sample Code"},{"id":"d426858ecf042060","type":"file","z":"6565a887b9e27bb2","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":1010,"y":180,"wires":[[]]}]

```

Untested as i do not have your data or modbus installed. You could do all the single functions in one to.

---

<div class="post-metadata">

### Author: ![jitesh](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jitesh](https://discourse.nodered.org/u/jitesh)
#### Post date: [5 February 2022 15:52 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/5 "2022-02-05T15:52:22Z")

</div>

thanks a ton  
😀 😀

---

<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: [19 February 2022 15:52 UTC](https://discourse.nodered.org/t/when-excel-report-is-generated-both-tag-value-not-come-in-same-row-i-am-very-new-and-sorry-for-my-bad-english-please-support/57819/6 "2022-02-19T15:52:48Z")

</div>

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