comGetProperty {rcom}R Documentation

Read One of a COM Object's Properties

Description

Reads one of the COM object's properties.

Usage

comGetProperty(handle,property,...)

Arguments

handle COM object (class "COMObject") as returned by e.g. comCreateObject
property name of property to get as a character string
... optional additional arguments for property specification (e.g. index for an array)

Value

The return value depends on the (data) type of the property to read.

Author(s)

Thomas Baier

See Also

comInvoke, comSetProperty

Examples

# start up excel
## Not run: x<-comCreateObject("Excel.Application")

# retrieve the "Visible" property
## Not run: v <- comGetProperty(x,"Visible")

# add a new workbook to Excel and gain access to the first worksheet
## Not run: newwb <- comInvoke(comGetProperty(x,"Workbooks"),"Add")
## Not run: ws <- comGetProperty(newwb,"Worksheets",1)

# get a specific range
## Not run: r <- comGetProperty(ws,"Range","A1","B4")

# do something now...

[Package rcom version 2.2-1 Index]