# Error spreadsheet

**URL:** <https://discourse.nodered.org/t/error-spreadsheet/87132>\
**Category:** General\
**Created:** [10 April 2024 18:11 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132 "2024-04-10T18:11:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [10 April 2024 18:11 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/1 "2024-04-10T18:11:53Z")

</div>

hello every one,

i'm new in node red i would like to use spreadsheet to read value from excel but i'm getting this error , i hope some one can help me

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a5f5d9793ea601109ef2b252e7876a71e41d0e21.png)

i also tried this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bccfccd386df597ef44685a1228f4ef0380d3dc9.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 April 2024 18:22 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/2 "2024-04-10T18:22:52Z")

</div>

Remove the outer quotes, use / instead of \

Edit: also, I see you are running node-red inside home assistant. One important aspect of this is that home assistant runs in docker and has no access to your computer files.

> [@Gravino](#):
>
> i'm new in node red

I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [10 April 2024 18:38 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/3 "2024-04-10T18:38:51Z")

</div>

hi Steve

i past the file inside the directory of home assistant

but receive this i will look at your link

thank you

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa487e21154284c948d93dc6b2c2c4e299f82088.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 April 2024 18:44 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/4 "2024-04-10T18:44:12Z")

</div>

I think the error speaks for itself.

I don't know home assistant but I do know docker. The path on the host OS (outside) is not necessary the same as the path I the container (inside). You may have to ask on the HA forum how/where files are accessible on the outside and inside of the node-red container.

You could try an exec node and run `ls` to list the directories inside the container?

---

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [10 April 2024 18:51 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/5 "2024-04-10T18:51:21Z")

</div>

my goal was to install node red in a raspberry on the netwerk of my factory.... use spreadshet to read excel file from server and make some automation with PLC S7 1200... now would like to mae some test before to buy everything

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 April 2024 19:09 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/6 "2024-04-10T19:09:45Z")

</div>

Install node-red natively and avoid all the hassle.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [11 April 2024 06:59 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/7 "2024-04-11T06:59:29Z")

</div>

Your problem is that when you install Node Red (Presumably you have used the Home Assistant Integration or HACS version) - then it installs it in a seperate container to the HA OS container - so they have no direct link.

You can not therefore easily trasnfer files between them

Craig

---

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [12 April 2024 18:08 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/8 "2024-04-12T18:08:27Z")

</div>

thank you very much to every one i installed node red on my pc and now is working

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [12 April 2024 18:36 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/9 "2024-04-12T18:36:42Z")

</div>

Lesson to take away from this : Don't use HA to run Node RED, install Node RED as it was intended.

Ouch! .... I know! 🫢

---

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [13 April 2024 21:42 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/10 "2024-04-13T21:42:00Z")

</div>

Marcus i wanted to do fast but i lost more time.... good lesson

now i ha ve another problem , i need to create a string to open the file, each day the file will have a different name like: myfile\_day\_month\_year

"C:\Users\TD\gravino\myfile\_day\_month\_year.xlsx" how i can create this and give to read node

i use this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9bedb081a736233a21f6b9f956d9ad5d3380afaa.png)  
but i don't know how to create the string

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [13 April 2024 21:57 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/11 "2024-04-13T21:57:28Z")

</div>

Hi @Gravino

You can create the filename with a date part relatively easy using a `change` node.  
setting the **filename** property, and connecting that to the `read file` node

```auto
'C:\\Users\\TD\\gravino\\myfile_' & $moment().tz("Europe/London").format("DD_MM_YYYY") & '.xlsx'

```

Change the TZ to suite

 ![Screenshot 2024-04-13 at 22.54.18](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aae912be7157de2ae95d9e8096b4bf71b2403b92.png)

Import

```auto
[{"id":"cd4dc02d262934a7","type":"change","z":"2d7bf6e3.84c97a","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"'C:\\\\Users\\\\TD\\\\gravino\\\\myfile_' & $moment().tz(\"Europe/London\").format(\"DD_MM_YYYY\") & '.xlsx'","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":355,"y":1110,"wires":[["9f70665bd58a5d62","3f611c566b7a7a34"]]},{"id":"11363bc975a9dcef","type":"inject","z":"2d7bf6e3.84c97a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":155,"y":1110,"wires":[["cd4dc02d262934a7"]]},{"id":"9f70665bd58a5d62","type":"debug","z":"2d7bf6e3.84c97a","name":"debug 9","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"filename","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":1060,"wires":[]},{"id":"3f611c566b7a7a34","type":"file in","z":"2d7bf6e3.84c97a","name":"","filename":"filename","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":550,"y":1110,"wires":[["3f0b49eeaa66b584"]]},{"id":"3f0b49eeaa66b584","type":"debug","z":"2d7bf6e3.84c97a","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":1110,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [13 April 2024 23:11 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/12 "2024-04-13T23:11:46Z")

</div>

In fact you can use JSONata expression direct in the filename field of the file read node, just select `J:` instead of `path`

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2024 06:19 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/13 "2024-04-14T06:19:25Z")

</div>

If you use year-month-day then the files will sort in date order.

---

<div class="post-metadata">

**Author:** ![Gravino](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@Gravino](https://discourse.nodered.org/u/Gravino)\
**Post date:** [14 April 2024 19:46 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/14 "2024-04-14T19:46:16Z")

</div>

Hi@Marcus  
thank you it works perfectly, please can you tell me where i can stugy a bit of j

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [14 April 2024 20:12 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/15 "2024-04-14T20:12:03Z")

</div>

Best source is here : [https://jsonata.org/](https://jsonata.org/)

There is also a playground on there, but do note : Node RED has added “extras” to the engine.

The internal JSONata editor is pretty helpful also

And as mentioned by @E1cid, you can use JSONata directly in the file read node.

---

<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:** [13 July 2024 20:12 UTC](https://discourse.nodered.org/t/error-spreadsheet/87132/16 "2024-07-13T20:12:43Z")

</div>

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