Determine whether input is COM object
tf = iscom(c)
example
tf = iscom(c) returns logical 1 (true) if c is a COM object. Otherwise, it returns logical 0 (false).
c
1
true
0
false
collapse all
Test an instance of a Microsoft® Excel® application. MATLAB® displays true, indicating that the Excel application is a COM object.
app = actxserver('Excel.Application'); iscom(app)
Create a workbooks object and test. MATLAB displays false, indicating that a workbook is not a COM object.
w = get(app,'workbooks'); iscom(w)
COM object, specified as a function handle.
COM functions are available on Microsoft Windows® systems only.