# Excel send latest data to another computer running node red on Docker

**URL:** <https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581>\
**Category:** FAQs\
**Created:** [19 June 2020 02:48 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581 "2020-06-19T02:48:50Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [19 June 2020 02:48 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/1 "2020-06-19T02:48:50Z")

</div>

Hello,

i would like to do one thing ,  
when the excel update new row of data , then the excel can send the new row data to node red.  
please give me some suggestion for this issue, thanks a lot in advance...

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [19 June 2020 06:05 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/2 "2020-06-19T06:05:02Z")

</div>

If the sheet does not need to use fancy fonts/graphs, one approach would be to save the sheet as CSV file. You could then configure a watch node to monitor changes in the CSV file, read it in using a file node and then pass the data though a CSV node to make the data easier to process.

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [19 June 2020 06:29 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/3 "2020-06-19T06:29:10Z")

</div>

thanks Ristomatti,  
for node red watch the excel file, i have two issues  
1, the excel file is located in other PC which is in the same local network with node red PC  
2, the node red is located in docker.  
i don't know how node red can watch and get data from the excel.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [19 June 2020 07:48 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/4 "2020-06-19T07:48:28Z")

</div>

Well you did not mention Excel is run on another computer. To get the data to Node-RED, you will either need to automatically transfer the file to the computer were Node-RED is running when it's modified or setup file sharing on the computer running Node-RED.

Which method would sound better to you and which operating systems do the computers have? Is the Excel running on a Windows PC and Node-RED on Raspberry Pi for example?

Edit: you mentioned Node-RED is running on Docker. On a media storage device then perhaps? It will complicate solving the issue and some Docker expert might be needed.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [19 June 2020 07:52 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/5 "2020-06-19T07:52:26Z")

</div>

I've edited the message title to better describe the issue so people who might have ideas might find this easier.

We're celebrating Midsummer Eve here in Finland today so I might not be reading the forum in a couple of days (depending on the level of hangover that will result from all this 😁).

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [19 June 2020 08:15 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/6 "2020-06-19T08:15:52Z")

</div>

Maybe something like this "Excel Internet of Things Connector"

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3ccb98a81511148ea334f71925e80ce0c7b0e1d4.jpeg "Excel IoT Connector - Excel Internet of Things Connector") ](https://www.youtube.com/watch?v=2arW8B1iIAs)

With this you can connect your excel to a mqtt broker. The broker will publish the data and is available in node red.

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [19 June 2020 08:37 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/7 "2020-06-19T08:37:16Z")

</div>

both computers run windows system, and i am a newbie with docker 😂

---

<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:** [19 June 2020 08:59 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/8 "2020-06-19T08:59:57Z")

</div>

> [@lee1](#):
>
> i am a newbie with docker

Unless you have a good reason then I suggest not using Docker. It is excellent in the right circumstances but just causes headaches in situations where it is not needed.

---

<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:** [21 June 2020 21:07 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/9 "2020-06-21T21:07:00Z")

</div>

Docker will massively complicate things. I'll ignore it here I'm afaid.

You have a number of options to update Node-RED from Excel. A lot is going to depend on how much control you have over the Excel workbook and whether you are permitted to run macro's on the workbook. If you can let us know that, I can outline what, if any, options you might have beyond having to keep saving the file and watching for changes which, I have to say, I don't believe is safe. It may not be safe because of how Excel manages file saves. Worse, this may vary depending on whether your file is stored in OneDrive/SharePoint or on some other location.

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [22 June 2020 05:58 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/10 "2020-06-22T05:58:45Z")

</div>

Hello TI,

i have tried to write macros in excel with HTTP POST request to node red web server.  
for now i can post the data inside one cell to node red,  
i am trying to send the the last row data(several columns) to node red now.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [22 June 2020 06:05 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/11 "2020-06-22T06:05:14Z")

</div>

If you get it working, please share the macro. Some others might be interested also. Even I might find use for it one way or another. 🙂

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [22 June 2020 06:27 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/12 "2020-06-22T06:27:19Z")

</div>

ok , no problem. after i finish, i will share the marco

---

<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:** [22 June 2020 11:44 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/13 "2020-06-22T11:44:23Z")

</div>

Found a bunch of useful links on using http requests in VBA macros:

[https://www.startpage.com/do/dsearch?query=excel+macro+http+POST+request&cat=web&pl=opensearch&language=english](https://www.startpage.com/do/dsearch?query=excel+macro+http+POST+request&cat=web&pl=opensearch&language=english)

Let me know if you get stuck.

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [8 July 2020 02:58 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/14 "2020-07-08T02:58:39Z")

</div>

Hello,

i can post data from excel to node red now.  
Below is my VBA code, I post data to node red cell by cell.

Sub BasicPOSTRequest()

```
Dim req As New MSXML2.XMLHTTP30
Dim reqURL As String
Dim i As Integer
Dim m, n As Long

m = ActiveSheet.UsedRange.Rows.Count
n = ActiveSheet.UsedRange.Columns.Count

For i = 1 To n Step 1
    reqURL = "https://10.193.7.229:1880/hello-raw"
    req.Open "POST", reqURL, False
    req.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    req.send ActiveSheet.Cells(m, i).Value
  
    If req.Status <> 200 Then
        MsgBox req.Status & "-" & req.statusText
    Exit Sub
    End If

```

Next

End Sub

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [8 July 2020 07:27 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/15 "2020-07-08T07:27:43Z")

</div>

Nice work! Does it send the whole sheet or new rows when they're added?

---

<div class="post-metadata">

**Author:** ![lee1](https://avatars.discourse-cdn.com/v4/letter/l/f9ae1b/32.png) [@lee1](https://discourse.nodered.org/u/lee1)\
**Post date:** [8 July 2020 07:29 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/16 "2020-07-08T07:29:14Z")

</div>

only send new rows

---

<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:** [8 July 2020 08:20 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/17 "2020-07-08T08:20:37Z")

</div>

It could be adjusted to detect any cell change.

---

<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:** [8 July 2020 08:25 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/18 "2020-07-08T08:25:00Z")

</div>

You could, of course have a function that reacts to a cell change and fires the data off automatically.

There are various ways, here is possibly the most generic - it detects any change on any worksheet and reacts to other macro changes as well as user input - it fires another function only for a specific cell but of course that could be adjusted:

```auto
Private Sub Worksheet_Change(ByVal target As Range)
    If Not Intersect(target, target.Worksheet.Range("H5")) Is Nothing Then myFunc
End Sub

```

---

<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:** [22 July 2020 08:25 UTC](https://discourse.nodered.org/t/excel-send-latest-data-to-another-computer-running-node-red-on-docker/28581/19 "2020-07-22T08:25:06Z")

</div>

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