Guys I need your help.
I want to read a bunch of xlsx files, but for some reason it is not working.
My code follows some suggestions given in other stack overflow posts.
I apologise but there is no reproducible code, I am totally lost here.
tbl <-
list.files(path = 'Data/', pattern = "*.xlsx") %>%
map_df(~read_excel(.))
Output: Error: `path` does not exist: ‘CRO-ALL-COUNTRIES.xlsx’
Now, if I run only the line
list.files(path = 'Data/', pattern = "*.xlsx")
Result:
> list.files(path = 'Data/', pattern = "*.xlsx")
[1] "CRO-ALL-COUNTRIES.xlsx"
[2] "Direct-material-packaging-ALL-COUNTRIES.xlsx"
[3] "Direct-material-Raw-material-ALL-COUNTRIES.xlsx"
I obtain all the files that are in that folder and CRO-ALL-COUNTRIES.xlsx is there!!!
Why can't I read it?