I don't know how to collect data for excel so that the header appears

493 / 5.000

Resultados de tradução

Hello, I'm trying to connect an opc ua to node red so that what is harvested from it goes to excel in the form of a spreadsheet with header and information. At first I was trying to do a test playing information before connecting with the opc ua, trying to do only the part where I put information and it throws it to excel but the information comes out in a disorderly way and without a header, the photos are below of what i did Sorry for the english, I'm using the translator





HI,

maybe try it like this

[{"id":"204ed6bbfd6cf0cf","type":"inject","z":"27d4cd61f8c2d5ed","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"alfa\":\"abc\",\"beta\":\"def\"}","payloadType":"json","x":155,"y":465,"wires":[["c3c92da5ab35c8f6"]]},{"id":"c3c92da5ab35c8f6","type":"csv","z":"27d4cd61f8c2d5ed","name":"","sep":",","hdrin":"","hdrout":"once","multi":"one","ret":"\\n","temp":"alfa,beta","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":320,"y":465,"wires":[["b469713283c5c661"]]},{"id":"b469713283c5c661","type":"file","z":"27d4cd61f8c2d5ed","name":"","filename":"/tmp/foo.csv","filenameType":"str","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":490,"y":465,"wires":[["8407a341dd4baefe"]]},{"id":"8407a341dd4baefe","type":"debug","z":"27d4cd61f8c2d5ed","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":675,"y":465,"wires":[]},{"id":"b67d539538ccbbcd","type":"inject","z":"27d4cd61f8c2d5ed","name":"reset","props":[{"p":"reset","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":160,"y":525,"wires":[["c3c92da5ab35c8f6"]]}]

The csv node is set to only send the headers once (until the reset is hit and then ir send it again - but you many not need that).

Where do I put this code you wrote?

It’s just an example. Copy it and import it to your workspace to see how I have set it up

Ok, thank u

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