I have tried to run the script of loop that opens every one of the files and adds them to the blank data frame.
fileNames <- list.files(pattern=".xlsm", recursive = TRUE)
fileNumbers <- seq(fileNames)
excel.data <- read_excel(fileNames[fileNumber],
skip=1,
col_names = T,
sheet = "Output")`
It is a part of loop:
for (fileNumber in fileNumbers){
tryCatch({
# read in the data from excel.
excel.data <- read_excel(fileNames[fileNumber],
skip=1,
col_names = T,
sheet = "Output")........}).
Loops run correct but gives blank column for the excel combined to new data frame. When i try to run individual subscript as above, it says "Error: path
must be a string" in console.