Skip to content
Prev 325127 / 398503 Next

Problem with ODBC connection

I tried reading your workbook using your code, i.e.

library(RODBC)
MyData <- sqlFetch(odbcConnectExcel('mypath/Myfile.xls'), "aaaa")
head(MyData, 30)

and got an error message saying that odbcConnectExcel is only usable with 32-bit Windows and I have a 64-bit system, so I can't help you there.  But there are many other options in R for reading Excel workbooks.  I was able to read your data using the read.xls function from the gdata package.  I am not endorsing that package, it just happened to be the first package on my system that I tried.  

So if you can't read the data one way, try another.  You could install and load the sos package and runthe following function

findFn('xls')

and you will get all sorts of suggestions.


Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA