# Sending data from node-red to xlsx file on windows 10

**URL:** https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674
**Category:** General
**Created:** [27 July 2022 08:39 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674 "2022-07-27T08:39:29Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Aldryan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aldryan](https://discourse.nodered.org/u/Aldryan)
#### Post date: [27 July 2022 08:39 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/1 "2022-07-27T08:39:29Z")

</div>

Hello, I'm still very new to Node-red and am confused on how to create a xlsx file and update it through the flow

Basically, I tried to recreate a flow from this reference

> **[Node-RED to Excel](https://www.hackster.io/rjrajbir/node-red-to-excel-98c840)**
>
> Sending data of wireless temperature and humidity sensor to Excel. By Rajbir Singh.

I modify the input to just a timestamp with a moment node(node-red-contrib-moment) and connect it to csv then to the file node. This is my flow:

 ![node to xlsx](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd2b8884eec6f58f40d62678fecac50394fb0c7c.png)

When I deployed the flow and clicked the time stamp, there is a payload but no xlsx file was created/updated (when I manually create the file).

FYI, I use siemens IoT 2050 to connect to node-red and on windows 10 (idk if there is a difference)

---

<div class="post-metadata">

### Author: ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)
#### Post date: [27 July 2022 09:46 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/2 "2022-07-27T09:46:03Z")

</div>

I believe there might be an issue with permissions to the C-drive folder you specified, or maybe the format. Can you try a few variations, for example..

`c:/file.csv` or `c:\\file.csv`

(try a .csv first...once that works, change to .xlsx)

Just a crazy suggestion...rather than sending to Excel (once an hour, once a day, etc.), why not send to a free InfluxDB database and view it via free Grafana? I started using Node-RED for a similar task (temperature readings) and [this video](https://www.youtube.com/watch?v=JdV4x925au0) helped me get started with the NR+Influx+Grafana trio.

---

<div class="post-metadata">

### Author: ![Aldryan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aldryan](https://discourse.nodered.org/u/Aldryan)
#### Post date: [27 July 2022 10:28 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/3 "2022-07-27T10:28:22Z")

</div>

Hi, thanks for the reply!  
I tried to change the path format, the file extension, and change the path from C to my D-drive. But all that doesn't seem to work.

Thanks for the suggestion, but on this project one of the objectives that are given to me is to create a .csv or .xlsx file from the node-red. Do you mind trying my flow and see whether there is a problem? this is my flow as of now.

```auto
[{"id":"ee64ddc4.82773","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"f4ed7228.1727","type":"inject","z":"ee64ddc4.82773","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":140,"wires":[["d3c27fc0.e81ec"]]},{"id":"d3c27fc0.e81ec","type":"moment","z":"ee64ddc4.82773","name":"","topic":"","input":"","inputType":"msg","inTz":"Asia/Jakarta","adjAmount":"0","adjType":"hours","adjDir":"add","format":"DD.MM.YYYY HH:mm","locale":"en_gb","output":"","outputType":"msg","outTz":"Asia/Jakarta","x":360,"y":140,"wires":[["3839708f.ea64a","a44f5.508d8b0b8"]]},{"id":"3839708f.ea64a","type":"debug","z":"ee64ddc4.82773","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":240,"wires":[]},{"id":"c1158bc0.daaa38","type":"file","z":"ee64ddc4.82773","name":"TestNodered","filename":"\\Users\\Aldryan Minanto\\Documents\\TestNodered.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"utf8","x":830,"y":140,"wires":[["c7cbf44b.daef48"]]},{"id":"c7cbf44b.daef48","type":"debug","z":"ee64ddc4.82773","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1010,"y":240,"wires":[]},{"id":"a44f5.508d8b0b8","type":"csv","z":"ee64ddc4.82773","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\r\\n","temp":"Time","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":630,"y":140,"wires":[["c1158bc0.daaa38","a1f60d30.79f07"]]},{"id":"a1f60d30.79f07","type":"debug","z":"ee64ddc4.82773","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":240,"wires":[]}]

```

Or maybe if you have a similar flow, do you mind sharing it? thank you again for the help!

---

<div class="post-metadata">

### Author: ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)
#### Post date: [27 July 2022 11:32 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/4 "2022-07-27T11:32:57Z")

</div>

@Aldryan Thanks for the flow. I got it to work with the following (on my PC)...

Filename (in Write File node): `F:\Users\USER\Documents\NodeRedTestFolder\NodeRed.csv`  
(adapt to a folder of your choice on your Windows PC)

I also had to change the permissions to the folder (to "Full control"):

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/90d95c8084d6aabb0866e8e7e15c77bf0c407d53.png)

---

<div class="post-metadata">

### Author: ![Aldryan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aldryan](https://discourse.nodered.org/u/Aldryan)
#### Post date: [27 July 2022 12:34 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/5 "2022-07-27T12:34:59Z")

</div>

Hi, I'm glad that my flow is working fine, I've tried to change the file path and the permissions of the folder, but it's still not working. Are there any other external factors that I need to change?

 ![permission](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/03031682fe788c0c1b408b7085b57e83a0de0df4.png)

---

<div class="post-metadata">

### Author: ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)
#### Post date: [27 July 2022 13:23 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/6 "2022-07-27T13:23:47Z")

</div>

Do you have any errors appearing in the Debug pane?

---

<div class="post-metadata">

### Author: ![Aldryan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aldryan](https://discourse.nodered.org/u/Aldryan)
#### Post date: [27 July 2022 15:15 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/7 "2022-07-27T15:15:46Z")

</div>

Not that I could see, I hope this gif could explain my current situation.

![Part 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/9/69f12fe4bb2e1722b98d6be0ebf781baebf551d3.gif)

Uploading: Part 2.gif...

---

<div class="post-metadata">

### Author: ![Aldryan](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@Aldryan](https://discourse.nodered.org/u/Aldryan)
#### Post date: [27 July 2022 15:16 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/8 "2022-07-27T15:16:47Z")

</div>

Part 2 of the gif  
 ![Part 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1e1afd6f7cec07b450223496b876f77821ed0811.gif)

---

<div class="post-metadata">

### Author: ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)
#### Post date: [27 July 2022 15:29 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/9 "2022-07-27T15:29:40Z")

</div>

As you do not have any errors in your debug pane, I believe your flow in Node-RED is fine. Your problem must be related to your Windows permissions. Keep trying different combinations, folder locations, (even a USB drive), etc.

---

<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: [25 September 2022 15:30 UTC](https://discourse.nodered.org/t/sending-data-from-node-red-to-xlsx-file-on-windows-10/65674/10 "2022-09-25T15:30:01Z")

</div>

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