Hello, i am struggling with exporting SQlite data to Excel file. I have found sample flow which can make a simple Excel file with two records. It looks like this:
[
{
"id": "8835f3f4f0a07f4c",
"type": "inject",
"z": "74afde7d.c4af",
"name": "",
"props": [
{
"p": "home",
"v": "HOME",
"vt": "env"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payloadType": "str",
"x": 190,
"y": 540,
"wires": [
[
"b02d4d07dc1f6208"
]
]
},
{
"id": "b02d4d07dc1f6208",
"type": "function",
"z": "74afde7d.c4af",
"name": "example data",
"func": "msg.payload = [{\n header: {\n 'author': 'authorName',\n 'title': 'title'\n },\n items: [\n {\n author:'john',\n title:'how to use this'\n },\n {\n author:'Bob',\n title:'so Easy'\n }\n ],\n sheetName: 'sheet1',\n }];\nmsg.filepath = 'c:\\\\Zalohy\\\\output.xlsx';\nmsg.topic=1\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 540,
"wires": [
[
"6268ad9d730a90f9"
]
]
},
{
"id": "6268ad9d730a90f9",
"type": "excelsheets",
"z": "74afde7d.c4af",
"name": "",
"file": "",
"x": 610,
"y": 540,
"wires": [
[]
]
}
]
But when I make a query on SQLite db, i get output like this:
(there is only date and timestamp field exported - just as a sample data).
And I am struggling how to format this output from SQLite db to format for Excelsheets node, which will export me this data with header Date and Timestamp and all the values from DB).
The node Excelsheets used is node-red-contrib-excelsheets.
Thanks for help!