0

So my question can be divided into two parts:
1. How to run a macro in an .xlsm file in R. (The macro generates a chart in another sheet)
2. How to copy this generated chart into another workbook

I am trying to automate some procedural work and hence need to do the above operations in R.

EDIT The chart generated is named Chart1

  • If you need to run a macro, you probably want to write a VBscript file, which you can call from R via `shell`. See this question for reference: https://stackoverflow.com/questions/2050505/way-to-run-excel-macros-from-command-line-or-batch-file – Mako212 Feb 14 '19 at 16:46
  • The answer using `library(RDCOMClient)` is closest to what you describe. VBscript is probably more flexible and well documented. – Mako212 Feb 14 '19 at 16:48
  • @Mako212 But how do I access that chart object in R? I need to copy that generated chart into another workbook. – Swastik Mohapatra Feb 14 '19 at 16:58

0 Answers0