[英]monitoring a range of cells inside of excel 2007 with C#/VSTO
I have a row in excel I'd like to translate into an ObserveableCollection in C# for binding/event purposes, so all accessor classes know they're getting the latest data from the source excel sheet. 我在excel中有一行,我想将其转换为C#中的ObservableCollection以便进行绑定/事件,因此所有访问器类都知道它们正在从源excel工作表获取最新数据。 How would this be done?
怎么做?
Clarification: I'm using an excel add-in project, not a workbook project, so am not sure whether or not XMLMappedRange Controls are an option. 澄清:我使用的是excel加载项项目,而不是工作簿项目,因此不确定是否可以选择XMLMappedRange控件。
Using VSTO you have a few options: 使用VSTO,您有几种选择:
A good primer on using the NamedRange and XmlMappedRange can be found here: The VSTO Programming Model . 可以在这里找到有关使用NamedRange和XmlMappedRange的良好入门知识: VSTO编程模型 。 A decent walkthrough using the NamedRange can be found in the Visual Studio Tools for Office (VSTO) 2005 Guided Tour .
在Visual Studio Tools for Office(VSTO)2005 Guided Tour中可以找到使用NamedRange的不错的演练。
I hope this helps... 我希望这有帮助...
Mike 麦克风
您可以在范围更改事件中添加OnChanged。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.