Excel to node red

Hello ,

i have problem whit how can i display data from EXCEL in real time to node red and build an dashboard ??

how can i show data from Excel in node red

1 Like

Hi Hicham,
Can you explain a bit more, you have a spreadsheet, and you'd like to load data from it and display it in a dashboard? Do you need to just read the file, or edit/save to it as well?
For displaying tables on the node-red-dashboard, take a look at node-red-node-ui-table: https://flows.nodered.org/node/node-red-node-ui-table
If you search the flows library, you can see there's a node to load and read data from excel files, have you tried that one yet? https://flows.nodered.org/node/node-red-contrib-spreadsheet-in

1 Like

thank you so much Afelix,
yea I want to write data in Excel file and at the same time be displayed in a dashboard in node red

How real time is real time? Because keep in mind that in order to display it, the file needs to be saved in Excel first. After all, it doesn't exist in the file yet if it isn't saved in Excel prior to it.

1 Like

Also, are you by chance working on the same school project as Send data from excel to dashboard?

You should note that Excel uses a complex file format that is absolutely NOT suitable for real-time display. Even when using Microsoft's Office 365 cloud service, you don't actually get real-time updates of data (despite Microsoft claiming you do). Microsoft actually "cheat", you don't see updates until the file is saved on both ends.

If you want something that works in near real-time, Google docs is the way to go. But better by far would be to use a data engine that supports publish/subscribe (pub/sub).

So as Lena say's - what do you mean by "real time"?

1 Like

This is the third topic in only a couple weeks where inputting data in excel, then reading it in node-red (preferably without having to save the file). Where google spreadsheets offers a kind of real time display/editing, Excel is not suitable for it.

1 Like

It certainly does look like a college exercise.

I'll provide some clues as to how i would attempt this...

  1. Create a HTTP endpoint in node red that will receive data & populate the dashboard controls
  2. In Excel, Using VBA, create a couple of macros...
    1. That receives a value & POSTs it to the node red endpoint (hint - Set hReq = CreateObject("MSXML2.XMLHTTP"))
    2. a macro that is called every time a cell value changes, that calls the first macro, passing in the new value (to be sent in the POST). (Hint Sub Worksheet_Change)

I think that'll be as close to real time as you'll get.

3 Likes

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