I am currently using the httr package to download an excel file in R.
res <- httr::POST(url = 'https:URL',
httr::add_headers(.headers=headers),
httr::set_cookies(.cookies = cookies),
body = payload)
test <- content(res, as = "raw")
the result is a 13.7 MB large raw:
str(test)
raw [1:13714912] 50 4b 03 04 ...
If I try to parse the contents, it recognizes the mime type for an excel document:
test <- content(res, as = "parse")
Error: No automatic parser available for application/vnd.ms-excel.
The size is correct for the file I am trying to work with
I cannot figure out how to read the data of the raw format of the excel file. All of the methods I can find require a path to import excel files. I would appreciate any assistance that could be provided.