Excel&之间的进程间通信C#应用程序? [英] Interprocess Communication between Excel & C# Application?

查看:97
本文介绍了Excel&之间的进程间通信C#应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在excel实例和C#应用程序之间建立通信.例如,当单元格值更改时,我想将更新后的值实时发送到C#应用程序.

I was wondering if there was a way to set up communication between an instance of excel and a C# Application. For instance, when a cell value changes, I would like to send the updated value to the C# Application in real time.

提前谢谢!

推荐答案

您需要Office 消费事件,因此您可以设置一个侦听器来捕获所需的事件.

You need the Office Primary Interop Assemblies, which are a .Net wrapper for the COM API exposed by MS Office. You can consume events through these, so you might be able to set up a listener that will capture the event that you want.

这篇关于Excel&之间的进程间通信C#应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆