getMsoChartSeries: Get the series parameters from a msoChart object

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Each series in a msoChart object can be represented as a formula: "=SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$3,Sheet1!$B$2:$B$3,1)", comprising of Name, XValues, Values (and/or BubbleSizes) and Index. This function can retrieve the series parameters in list form.

Usage

1
getMsoChartSeries(oChart, format = c("list"))

Arguments

oChart

msoChart object (COMIDispath class)

format

(deprecated) "list"

Value

A list comprising of lists of name (Name), label (XValues), value (Values) and/or weight (BubbleSizes) and orient (series on rows or columns), e.g.:
$'1“

$ name
"ul1" "ul2" "lr1" "lr2" "sheet" "formula"
[1,] "1" "2" "1" "2" "Sheet1" "Sheet1!$B$1"
$ label
"ul1" "ul2" "lr1" "lr2" "sheet" "formula"
[1,] "2" "1" "3" "1" "Sheet1" "Sheet1!$A$2:$A$3"
[2,] "5" "1" "5" "1" "Sheet1" "Sheet1!$A$5"
$ value
"ul1" "ul2" "lr1" "lr2" "sheet" "formula"
[1,] "2" "2" "3" "2" "Sheet1" "Sheet1!$B$2:$B$3"
[2,] "5" "2" "5" "2" "Sheet1" "Sheet1!$B$5"
$ orient

[1] "vertical"

Note

This function will call MS Excel process to communicate with the mso file via COM interface silently.

Author(s)

Yiying Wang, wangy@aetna.com

References

Refer to cell_limits in cellranger to understand the data structure ul1, ul2, lr1, lr2, sheet, ...

See Also

RDCOMClient cellranger

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
ppt <- RDCOMClient::COMCreate("Powerpoint.Application")
pres <- ppt$Presentations()$Open(<some ppt file>)
slide <- pres$Slides(2)  # the 2nd slide
shape <- slide$Shapes(3)  # the 3rd shape
if (shape[['HasChart']] == -1) {  # if the shape contains msoChart
    chart <- shape[['Chart']]
    getMsoChartSeries(chart)
}

## End(Not run)

madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.