I want to find the count of the number of sheets in all excel files. This is what I did.
file_list <- list.files(pattern = '.xlsx',recursive = T)
head(file_list)
[1] "one.xlsx" [2] "two.xlsx"
[3] "three.xlsx" [4] "four.xlsx"
[5] "five.xlsx"
So this file_list variable contains around 63 excel files.
for (num in file_list) {
length( excel_sheets( num ) )
}
Which results in NULL result.
But when I do manually, I am getting the count. For example,
length( excel_sheets("../my_excel_directory/one.xlsx") )
[1] 2
Thanks for the help in advance!