[R] execution of R

dhana.sa at gmail.com dhana.sa at gmail.com
Mon Sep 21 10:55:00 CEST 2009


Hello Everyone,

I want help regarding to write VBA Macro code to execute R Statistical software to retrieve data from third party applications for example, Spreadsheet or Comma Separated Values file (.csv file).

I have RExcel add-in activated in my Spreadsheet. RExcel is integration between Excel and R Statistical Software. RExcel is downloadable from www.statconn.com 

This is what I made so far… but got compilation error.

Public ActiveServerAtStart As Boolean
Sub  GetValue()
  MsgBox “R retrives data”
  Rinterface.StartRServer
  Rinterface.RRun “z<-read.table(“F:\\CsvFile”, header=TRUE)”
  Rinterface.GetArray “z”, Range(“Sheet1!A1”)
  Rinterface.StopRServer

End Sub()

CsvFile is my target file from which I need to retrieve data. GetValue() is my macro name for the active work sheet. 

Thanks in advance.




More information about the R-help mailing list