read_excel: issue accessing .xlsx on web

I'm looking for help with readxl. I need to access an .xlsx file from the web. I want to use readxl as it will allow me to specify col_type. The file is a data collection template containing no rows. I'm using it to facilitate column ordering of data collected in the field. I can access the data using openxlsx::read.xlsx, however all the columns are classified as logical which complicates dplyr::bind_rows in my script

so, this imports the file but with incorrect column classes
read.xlsx("https://....xlsx", sheet = 4)

and this gives an error
readxl::read_xlsx("https://....xlsx", sheet = 4)
Error: path does not exist:

It seems like read_xlsx should work. I can always import with openxlsx and use purrr::map to reclassify cols, just looking for the simplest solution. Any assistance would be appreciated.

I believe readxl doesn't yet support reading from a URL take a look into this github issue for more information about this.

Thanks for the link to github. Sure enough readxl does not yet support fetching data from web sources. The link contained useful information on using httr::GET to import the data into a tempfile and accessing it with read_xlsx from there.

template <- tempfile(fileext = ".xlsx")
GET(url = "https://...xlsx",
write_disk(template) )