created_at2021-12-11 22:13:08.754345
updated_at2023-05-29 22:18:10.763957
descriptionPull realtime Netidx data into Excel with RTD
Michael Bacarella (mbac-architect)



This is an Excel COM add-in that allows the =RTD() formula to pull in real time data from Netidx.

Say you have published some data, maybe from the shell publisher, and you want to show it to your boss, but "that commandline thing" or "that linux thing" is not something your boss does.

> netidx publisher --bind --spn publish/
/test/foo|array|[42, -42]

If you install the add-in on you bosses' machine, then he can pull that data into a cell in an Excel spreadsheet, and you can stop worrying about how to present results to pointy haired types and get your job done.


The key point is if a value in netidx updates, Excel will update almost immediatly, and your bosses pivot table will update too. csv exports are one step closer to dieing!


=RTD("netidxrtd",, PATH)

PATH can of course be a ref, or another formula, it's Excel, your boss knows Excel ... right?


Even if you subscribe to a lot of data, or you subscribe to data that updates quickly, Excel should remain responsive because RTDs are throttled, and all the netidx processing is happening on a background thread pool. For example here Excel is maxing out my wifi network by subscribing to the stress publisher, however it remains completely responsive. It's actually pulling in 2 million updates per second, and that's limited by the network, not the cpu.



There are pre built binaries here

But you want to build it you need a windows machine (obviously) probably windows 10 or above, but 8 might work. You need to install rust, the easiest way is to use rustup. You need to install git. Once you have those two things installed,

> git clone
> cd netidx-excel
> cargo build --release

The dll should be built in target/release/netidx_excel.dll


To install you need to decide where you want the dll to live, it really doesn't matter, but I put it in C:\Program Files\netidx-excel on my machine. Then you need to run regsvr32 on the dll as Administrator, that will set up the registry entries to register it as a proper COM server. So in an admin powershell,

> mkdir 'C:\Program Files\netidx-excel'
> cp target\release\netidx_excel.dll 'C:\Program Files\netidx-excel'
> regsvr32 'C:\Program Files\netidx-excel\netidx_excel.dll'

The most common errors are regsvr32 isn't in your path, and/or your shell is not running with admin rights.

You might also need to open the properties of the dll and "unblock" it (if you downloaded a binary instead of building it yourself).

32 bit office on 64 bit windows

If you are running the 32 bit version of office, maybe because you have limited ram, then you will need to also install the netidx_excel32.dll, and you will need to run regsvr32 on that as well, just like the above. If you are building from source you will need to install the target i686-pc-windows-msvc and build the 32 bit dll with that target, e.g. cargo build --target i686-pc-windows-msvc --release, and then the dll will be in target/i686-pc-windows-msvc/release instead of target/release.


  • No write support; there's no real reason other than time, it's perfectly possible
  • No publish support; again, no real reason, perfectly possible, but significantly more time than write
  • No resolver list support; once again, time, no real problems with this
  • I could remove the requirement for admin rights to install if people cared, but then you'd have to regsvr32 it for every user on a machine


I programmed on windows for a WHOLE month so that you NEVER have too. Because trust me, you NEVER want to. But if you are curious about the dreams I had during that month, read this before bed Inside COM+. Really, don't do it. COM must have seemed like a good idea to someone at some point in history, right? Developers! Developers! Developers! ... Developers! I mean, GObject seems totally great now, really.

Commit count: 70

cargo fmt