I have a single excel file in a folder, and I want R to read any/all excel files in the directory.
When I tried the following:
excel_df <- read_excel("C:/Home/User/dbd/*.xlsx")
I get an error that the file path does not exist.
When I tried this:
base <- as.character("C:/Home/User/dbd/*.xlsx")
files <- file.info(list.files(path = base, pattern = '*.xlsx',
full.names = TRUE, no.. = TRUE))
daily_numebrs<-readxl::read_excel(rownames(files)[order(files$mtime)][nrow(files)])
as I proceed with other codes, it says the
Error in ...object 'daily_numbers' not found.