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


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:


Not working for me but I am using below code

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

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.


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