imgschatz imgschatz - 1 year ago 146
R Question

read.xls (gdata) - from an https url

I'm trying to read in an excel file from a URL:

I can download the file, and read it in using read.xls from the gdata package no problem.

But I get an error when trying to read it in directly.

Unable to open file ''.
Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, :
Intermediate file '/tmp/RtmptxiYS1/file42f8532a0129.csv' missing

I've tried this:
Importing Excel file using url using read.xls but the 's' in 'https' is required.

Answer Source

Try this

tmp <- tempfile()
              destfile=tmp, method="curl")

read.xls(tmp, skip=2)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download