dispinterface question
-
Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example:
Worksheets("sheet1").Range("A1").value = value
Does anyone know how excel exposes these Sheet objects? -
Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example:
Worksheets("sheet1").Range("A1").value = value
Does anyone know how excel exposes these Sheet objects?Derive your interfaces from IDispatch if you want to be automation compatible. In Excel case the interface probably has a method called "Worksheets" which takes a BSTR param and returns a Range object : IExcelInterface::Worksheets(BSTR sheet) : Range; The object Range implements an interface IRange, which has a range method : IRange::Range(BSTR range) : Value; The value object has a property named "value". ... and so on. All you need to do is to expose your application object model ( COM object hierarchy ) to the automation clients ( scripts, binaries, etc ).
-
Hi, I have an application with some COM objects. Now I want to expose some of these objects the way excel does. For example:
Worksheets("sheet1").Range("A1").value = value
Does anyone know how excel exposes these Sheet objects? -
Take a look at Using Standard Objects[^] and below. Intend the "Worksheets" instead of "Documents" there. With best wishes, Vita
Thanx! This seems to be really usefull info.