[R] how to use Excel VBA's Shell() to call and execute R file

kuna_matata kuna_matata at earthlink.net
Mon May 6 17:44:40 CEST 2013


I realize this is an old post, but thought it's good to answer for other
folks that hit it during a search.

RExcel is fantastic. However, it requires all the users to install RExcel.
So the VBA approach may still be a good alternative in some simple cases,
like the example question.

I think what you need it a wrapper .bat file. Create a .bat file that does
the R execution that you desire. Then call that .bat file using the shell()
command in VBA. Using a wrapper also makes debuging easier. You can run it
from a cmd prompt outside excel to test it and see error messages for
example.

kuna_matata



--
View this message in context: http://r.789695.n4.nabble.com/how-to-use-Excel-VBA-s-Shell-to-call-and-execute-R-file-tp2014944p4666415.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list