Hello every one,
While working on a shiny app I am facing some difficulties reading excel files from a link from DropBox and others. Here is the code below that I have used for reading the CSV file from DropBox and other platforms.
I'm not sure the error you're receiving, but assuming upURL points to a file with a .xls or .xlsx extension, have you tried using datf <- readxl::read_excel(upURL)?
Hello @scottyd22,
I have tried this function before but it couldn't read the path and always returning the error that I have mentioned below.
> x <- "https://www.dropbox.com/scl/fi/y196q11nz5ilvmdewskqj/excel_Value1_DateTime_ID_Value2.xlsx?dl=1&rlkey=6qpyxqhnlxoseq63vs96vc13n"
> datf <- read_excel(x,col_names = TRUE,col_types = "text")
Error: `path` does not exist: ‘https://www.dropbox.com/scl/fi/y196q11nz5ilvmdewskqj/excel_Value1_DateTime_ID_Value2.xlsx?dl=1&rlkey=6qpyxqhnlxoseq63vs96vc13n’
All other files like tsv, csv, txt, dat are working fine with their respective function. Only problem is with the excel file's link. When I am uploading the original file then its actually working.
read.csv may be considered nice, because it offers this sort of flexibility.
Its common for most functions to just accept a file path on your local system and leave it up to you to provide that.
The easiest approach is probably for you to use download.file() and then proceed from there
If ms excel wont open it then we wont expect any r package to do better...
Did you personally load this excel to dropbox ?
Maybe whoever loaded this to dropbox has made a mistake