0

No problem trying to upload a csv file:

url <- read.csv("http://databank.worldbank.org/data/download/GDP.csv")

When trying to upload the same file, but xls:

urn <- read_xls("http://databank.worldbank.org/data/download/GDP.xls")

I receive the following error:

Error: `path` does not exist: ‘http://databank.worldbank.org/data/download/GDP.xls’
Phil
  • 7,287
  • 3
  • 36
  • 66
  • Does this answer your question? [Read Excel file from a URL using the readxl package](https://stackoverflow.com/questions/41368628/read-excel-file-from-a-url-using-the-readxl-package) – Phil Jul 29 '20 at 04:06

1 Answers1

0

You may try this. This will help.

install.packages("rio")
data <- rio::import("http://databank.worldbank.org/data/download/GDP.xls")
head(data)
  • Thanks for the help AR Ashiq. Actually I finally used the following code: install.packages("readxl") library(readxl) urlgdp<-'http://databank.worldbank.org/data/download/GDP.xls' pgdp<-tempfile() download.file(urlgdp,pgdp,mode="wb") dbgdp<-read_excel(path=pgdp,sheet=1) – Christian Leacock Jul 31 '20 at 19:06