[R] Download xls file from internet

Pete B Peter.Brecknock at bp.com
Thu Aug 5 23:25:17 CEST 2010


I am trying to download an Excel file from the the internet with the
following R command

download.file("http://ir.eia.gov/wpsr/psw09.xls","C:\\Temp\\psw09.xls")

The file is downloaded but when I try and open it I get a message from Excel
telling me that the file is corrupt and it cannot be opened.

If I manually download the file it opens without problems.

Any insights would be gratefully received.

Kind regards

Pete




-- 
View this message in context: http://r.789695.n4.nabble.com/Download-xls-file-from-internet-tp2315629p2315629.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list