# Lora to excel with nodered

**URL:** <https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390>\
**Category:** General\
**Created:** [20 July 2020 10:18 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390 "2020-07-20T10:18:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![perico](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@perico](https://discourse.nodered.org/u/perico)\
**Post date:** [20 July 2020 10:18 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390/1 "2020-07-20T10:18:23Z")

</div>

Hello everybody,

I get the data of my gateway with Lora node, but now I need to save this data (temperatures) in a Excel file.  
I'm using the nodes of the picture below, I've tried with and without csv node, but nothing happens and I can't save my data into the xlsx specified file.  
Somebody knows If i miss something or how I can achieve it?

Thanks, Perico.  
 ![sensor](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c02e285122ace442e687e70ffc4b06b31733e0b7.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 July 2020 12:15 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390/2 "2020-07-20T12:15:07Z")

</div>

I would try just using a CSV file for now rather than messing with the complexity of .xlsx files. You can enhance later if you really need to output to a workbook.

You will need to share the data structure coming from your function node otherwise we can't see what it is like.

However, in general, you will want to end up with an array of objects to successfully convert to the tabular format needed for CSV or Excel.

```auto
[
    {
        "col1": val1,
        "col2": val2,
    },
   ....
]

```

---

<div class="post-metadata">

**Author:** ![perico](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@perico](https://discourse.nodered.org/u/perico)\
**Post date:** [20 July 2020 14:50 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390/3 "2020-07-20T14:50:57Z")

</div>

At the picture below I show the coming structure of my data, my intention is to save this data in a file. In the function node I catch only the payload, because I only need it.

 ![CapturaLora](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f07832cbc52cfbd828016c317bc0433b923a3803.png)

 ![CapturaFuncio](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/1/b11bcef4d79eeea849c7575f04d1b35d8d182409.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 July 2020 16:27 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390/4 "2020-07-20T16:27:39Z")

</div>

so the csv node expects to receive a msg.payload with and object with properties in. you function node doesn't do that ... you may need

```auto
msg.payload = msg.payload.temperature;

```

but we can't actually see what is really coming out of the lora node so hard to guess ... show us the debug directly connected to that.

---

<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:** [18 September 2020 16:27 UTC](https://discourse.nodered.org/t/lora-to-excel-with-nodered/30390/5 "2020-09-18T16:27:40Z")

</div>

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