How to send data to excel

Hi, I am trying to send data of wireless temperature and humidity sensor to excel.
I have created nodes

here I have used here function node

and file node to save data.

but i am unable to get data in excel.

please suggest me which nodes are good for it.

Thanx in advance.

You are saving it as an Array, try keeping it as an object and then use the CSV node to convert it to comma separated values before using the file-out node

Can you please share the flow.

No I'm on my phone.
Have a play, given the suggestions above and debug nodes you should get there in a couple of minutes

Instead of payload:[m] try payload:m in your function node.

1 Like

Hi, Thanx for the suggestion.I tried this

But I am getting values like this

Please help me out to get values in proper way.

Did you then feed it through a CSV node as was suggested ?

Yes, But when I am connecting the CSV node, Then I am not getting any values.

So what does your flow look like with the csv node?

This one

Given you are only wanting to write two values, then your original function was 99% correct. You just needed to change the [m] for m in the return statement. Then you can forget about the CSV node.

I am getting values like this


But I want the first row as heading like Temperature and humidity

Yes i have done that.

In the file node you can turn off the append line ending, as you are getting extra blank lines you don’t need.
There is no easy way to just add the headings once. Easiest I probably just to create the initial empty file with just the headings in then let the flow append lines after that.

is there any another way to write once headings, something like the code in javascript.