Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the appropriate technology to pull data to into excel spreadsheet via a formula from a .NET source?

I would like to be able to allow a user to enter a custom formula in a cell in Excel which will subscribe to data provided by an external .NET application. For example, the user might enter...

=getCurrentValue("ABC")

There is an external .NET (C#) application that is determining the value of "ABC" every minute.

The cell should display the initial value of "ABC" from the external application and update when the external application sends a new value.

In the past I think the external application would be a DDE server and the formula would be a DDE client formula but DDE is apparently dead. What is the "correct" technology to use to do this?

Note that the spreadsheet needs to pull the data via a formula. The information is not going into a fixed template excel file but into any spreadsheet into which the user enters a formula.

Thanks,

John

like image 411
John C Avatar asked Mar 16 '12 20:03

John C


1 Answers

Excel RTD (Real Time Data) is the replacement for DDE. It allows you to push values to a cell whenever updates are available. If the process providing the updates is an external application, setting up a WCF channel between the RTD server and the external app should allow you to feed real-time updates into Excel.

Here are some links:

  • How to create a RealTimeData server for Excel
  • Excel RTD Servers: Minimal C# Implementation
  • Excel RTD Servers: A Topic’s Initial Value
  • Excel RTD Servers: How to use UpdateNotify Properly
  • Excel RTD Servers: Multiple Topics in C#
like image 118
bradmo Avatar answered Oct 07 '22 16:10

bradmo