Run and save macro in excel through R

Hello everyone,
I am running macro (clicking macro button) from R
But then it ask me to save output file manually,want to operate this too from R only.

How to save any excel file in local machine resulted from macro output from R

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Hi,

Not working for me but I am using below code

library (RDCOMClient)
library(readxl)
xlApp <- COMCreate("Excel.Application")
xlWbk_path <- Sys.glob("C:\\Users\\....\\.....\\...\\*.xlsm", dirmark = FALSE)
xlWbk <- xlApp$Workbooks()$Open(xlWbk_path[1])
xlApp[['Visible']] <- TRUE
xlApp$Run("Extract")

now after xlApp$Run("Extract") it opens up window to save output file to local machine, this part I want to mange from R of saving file.

Capture

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.