Is there an "easy" or good way to run/launch an Excel VBA macro from within R? --------------------------------- Pinpoint customers who are looking for what you sell. [[alternative HTML version deleted]]
I have Excel files that use the auto_open() sub to run automatically and then I can open the file using R by using the shell() command. Then once the file is done running, I can process the file again using R. Works pretty well, as long as I don't have any problems on the excel side. shell("excel {path to filename}") Excel has to be in your path, or you can give the full path to excel. You don't need the double quotes if none of your folders or files have spaces in them. HTH, Roger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Thomas Pujol Sent: Monday, July 16, 2007 12:13 AM To: r-help at stat.math.ethz.ch Subject: [R] can I run/launch an excel VBA macro from wihin R? Is there an "easy" or good way to run/launch an Excel VBA macro from within R? --------------------------------- Pinpoint customers who are looking for what you sell. [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ********************************************************************** * This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by any error in transmission. If you have received this message in error, please immediately notify the sender by e-mail, delete the message and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient.
Richard M. Heiberger
2007-Jul-16 12:42 UTC
[R] can I run/launch an excel VBA macro from wihin R?
Install the R(D)COM server and the RExcel interface. It provides complete two-way communication between R and Excel. See http://sunsite.univie.ac.at/rcom/ for full information and download. Rich