Re: [Rcom-l] Sourcing R code from VBA

2008-10-06 Thread Santosh Mishra
Dear Erich and Wayne, Thank you for your comments. As per your suggestion I changed the RunFile call. Also, as Wayne pointed out it is the invocation of xlsReadWrite library that was creating the problem. Once replaced the code bit from the file it runs fine now. Thank you so much for kind help. A

Re: [Rcom-l] Sourcing R code from VBA

2008-10-06 Thread Erich Neuwirth
The problem with file names is that directory separators are different in R and and in VBA. So if you are running VBA stuff, you have to use single backslashes since this is what VBA exopects. Call RInterface.RunRFile("C:\Subodh\Prog\temprr.txt") You also could omit Call and write RInterface.RunRFi

RE: [Rcom-l] Sourcing R code from VBA

2008-10-06 Thread Wayne.W.Jones
l spreadsheet anyhow! Regards, Wayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Santosh Mishra Sent: 06 October 2008 08:50 To: R (D)COM and RExcel server related issues Subject: Re: [Rcom-l] Sourcing R code from VBA Thanks for the suggestion.

Re: [Rcom-l] Sourcing R code from VBA

2008-10-06 Thread Santosh Mishra
Thanks for the suggestion. However, the problem still remains. It is giving me the same error. I Santosh Santosh Mishra Assistant Professor Department of Economics Oregon State University Corvallis, OR, 97330 2008/10/6 <[EMAIL PROTECTED]> > Try Call RInterface.RunRFile("C:/Subodh/Prog/temprr.tx

RE: [Rcom-l] Sourcing R code from VBA

2008-10-06 Thread Wayne.W.Jones
Try Call RInterface.RunRFile("C:/Subodh/Prog/temprr.txt") or Call RInterface.RunRFile("C:\Subodh\Prog\temprr.txt") instead of Call RInterface.RunRFile("C:\\Subodh\\Prog\\temprr.txt") Regards Wayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Santosh