# Error Write file

**URL:** <https://discourse.nodered.org/t/error-write-file/90784>\
**Category:** General\
**Created:** [8 September 2024 02:43 UTC](https://discourse.nodered.org/t/error-write-file/90784 "2024-09-08T02:43:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wcordova](https://avatars.discourse-cdn.com/v4/letter/w/bb73d2/32.png) [@wcordova](https://discourse.nodered.org/u/wcordova)\
**Post date:** [8 September 2024 02:43 UTC](https://discourse.nodered.org/t/error-write-file/90784/1 "2024-09-08T02:43:51Z")

</div>

hi all  
From temperature values (which comes from Logo siemens) I created an object (with two attributes :date and temperature) using this function:  
var hoy=new Date  
var temperature={  
fecha: hoy.getDate().toString()+"-"+hoy.getMonth().toString()+"-"+hoy.getFullYear().toString()+" "+hoy.getHours().toString()+":"+hoy.getMinutes().toString(),  
temperatura:(msg.payload\*2.5-500)/10  
}  
return temperature  
i want to register this data in a csv file and I used write data node but for some reason this does not work.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/8/4863790990e468a46634fccb30ef4ebb79b071ea.png)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [8 September 2024 03:05 UTC](https://discourse.nodered.org/t/error-write-file/90784/2 "2024-09-08T03:05:50Z")

</div>

> [@wcordova](#):
>
> i want to register this data in a csv file and I used write data node but for some reason this does not work.

Something seems to be going wrong.

You have not told us:

1. The name of the file.
2. It's location on your computer.
3. Whether it already exists.
4. What you expect to see in the file.
5. What you actually see in the file.
6. Any error messages.
7. What kind of node is this "write data node"
8. How it is set up.

If we had this information we would be better equipped to advise you.

---

<div class="post-metadata">

**Author:** ![wcordova](https://avatars.discourse-cdn.com/v4/letter/w/bb73d2/32.png) [@wcordova](https://discourse.nodered.org/u/wcordova)\
**Post date:** [8 September 2024 13:50 UTC](https://discourse.nodered.org/t/error-write-file/90784/3 "2024-09-08T13:50:53Z")

</div>

hi @jbudd  
I attached the js file.  
BR  
Walter  
[flows.json](https://discourse.nodered.org/uploads/short-url/dPJLzEd4Rsc5fMZFQXc7bc3p1M0.json) (4.1 KB)

---

<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:** [7 December 2024 13:51 UTC](https://discourse.nodered.org/t/error-write-file/90784/4 "2024-12-07T13:51:02Z")

</div>

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