FontanaF FontanaF - 1 year ago 84
R Question

Import in R the specified worksheed of a .xls from url

I'm interested in importing directly in R a portion of the .xls associated with the following url. The .xls has two different spreadsheets. I want to import the table that starts in the 5th row in the second spreadsheets. An attempt is the following:

url = ""
dataset = read.xls(url, sheet=2, header=T, skip=4)

The error that I get is:

Error in file.exists(tfn) : invalid 'file' argument

I'm working in Windows. The source of the .xls is here under the name "All available observations". You are very welcome use different packages.

Answer Source

First step is to download file then you can read it.

url = ""

download.file(url, destfile="file.xls")

data<- read.xls("file.xls", header=TRUE, pattern="Rank")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download