John C
John C

Reputation: 238

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

Upvotes: 6

Views: 2193

Answers (2)

bradmo
bradmo

Reputation: 784

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:

Upvotes: 5

Hans Leautaud
Hans Leautaud

Reputation: 1752

You can communicate with Excel sheets through the Excel Api:

new Microsoft.Office.Interop.Excel.Application();

Upvotes: 0

Related Questions