connecting to .xls files


/ Published in: R
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # first row contains variable names
  2. # we will read in workSheet mysheet
  3.  
  4. library(RODBC)
  5. channel <- odbcConnectExcel("c:/myexel.xls")
  6. mydata <- sqlFetch(channel, "mysheet")
  7. odbcClose(channel)

URL: http://www.statmethods.net/input/importingdata.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.