微软®Component Object Model(COM)提供用于将可重用的二进制软件组件集成到应用程序中的框架。由于组件由编译代码实现,所以源代码可以用支持COM的编程语言编写。金宝app简化了升级到应用程序,因为只需重新编译整个应用程序就可以简单地交换组件。此外,组件的位置对应用程序是透明的,因此可以将组件重新定位到单独的过程甚至远程系统,而无需修改应用程序。
Alternatively, consider using the Microsoft .NET Framework.
MATLAB supports COM and the .NET Framework integration on the Microsoft Windows®platform only.
actxserver |
Create COM server |
actxGetRunningServer |
Handle to running instance of Automation server |
methodsview |
查看类方法 |
eventlisteners |
List event handler functions associated with COM object events |
registerevent |
将事件处理程序for COM object event at run time |
unregisterallevents |
Unregister all event handlers associated with COM object events |
未注册 |
Unregister event handler associated with COM object event at run time |
ISCOM |
Determine whether input is COM object |
isevent. |
Determine whether input is COM object event |
InterInterface. |
确定输入是否为COM接口 |
COM |
Access COM components fromMATLAB |
Write Data to Excel Spreadsheet
This example shows how to write a MATLAB matrix to an Excel®spreadsheet.
This example shows how to use a COM Automation server to access another application from MATLAB.
This example shows how to change the cursor icon in an Excel® spreadsheet.
This example shows how to change the height of a row, defined by a范围
对象,在电子表格中。
此示例显示如何在Excel中跳过可选的输入参数Add
方法,用于将纸张插入工作簿中。
Connect to Existing Excel Application
This example shows how to read data from an open file,weekly_log.xlsx
,在matlab。
Display Message for Workbook OnClose Event
This example shows how to handle a COM interface event, how to set up an event in a微软Excel.workbook
对象,以及如何处理它BeforeClose
事件。
使用MATLAB命令了解COM对象
COM concepts and an overview of COM support in MATLAB.
Examples that show how to use COM interface with MATLAB.
Before using COM objects, you must register their servers.
How to create Microsoft controls and COM server objects
将数据传递给并处理来自COM对象的数据
List property names and set values, work with multiple objects and properties, use the Property Inspector, use enumerated values and custom properties
你执行,或invoke, COM functions or methods belonging to COM objects.
Respond to events, write event handlers
Useregisterevent
注册服务器的事件。
Use these MATLAB functions to save and restore the state of a COM control object.
使用com interfaces
COMcollectionsare a way to support groups of related COM objects that can be iterated over.
COM client-server configurations in MATLAB.
MATLAB Application as DCOM Client
Distributed Component Object Model (DCOM) is a protocol that allows clients to use remote COM objects over a network.
Microsoft does not support loading 32-bit DLLs or in-process COM servers into a 64-bit application, or conversely.
When a MATLAB client sends a command with an invalid argument to a COM server application, the server sends back an error message in the following format.