autoRefreshPptCharts: Automatically refresh msoChart in a PPT presentation

Description Usage Arguments Value Author(s) Examples

Description

It calls setMsoChartSeries and setMsoChartScale to match source data with chart series and axes scales.

Usage

1
2
3
4
5
autoRefreshPptCharts(files = NULL, orient = c("vertical",
  "horizontal"), autoFill = FALSE, save = TRUE, ...)

refresh_ppt_charts(files = NULL, orient = c("vertical", "horizontal"),
  autoFill = FALSE, save = TRUE, ...)

Arguments

files

character vector of ppt files. If NULL, a GUI wizard will launch.

orient

character, "vertical" or "horizontal". How the series is generated.

autoFill

logical, whether fill the series with the entire row/col. Default FALSE

save

Logical, whether save the file after processing. Default TRUE.

...

other arguments, e.g., gapWidth and emptyString for getMsoChartSourceData.

Value

Nothing

Author(s)

Yiying Wang, wangy@aetna.com

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']]
    autoRefreshPptCharts(NULL, orient="vertical", autoFill=TRUE)
}

## End(Not run)

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