Can not find path

I used to be able to write: excel_sheets("00_data/excel/ds_1.xlsx")
while having my working directory as : "C:/Users/Karlerdo/Desktop/Course_Data_Analysis_in_R/00_data/excel"
and it would find the path. Also, when typing this it would work:
clients <- read_excel("00_data/excel/ds_1.xlsx",
sheet = "Clients")

but now it does not and I am not sure why. Please help. Thanks

excel_sheets("00_data/excel/ds_1.xlsx")
Error: path does not exist: ‘00_data/excel/ds_1.xlsx’

You seem to be repeating part of the path. If your working directory is "C:/Users/Karlerdo/Desktop/Course_Data_Analysis_in_R/00_data/excel" and you specify the file as "00_data/excel/ds_1.xlsx", R will look for "C:/Users/Karlerdo/Desktop/Course_Data_Analysis_in_R/00_data/excel/00_data/excel/ds_1.xlsx", which I assume is not what you want. Try specifying the file as just "ds_1.xlsx" when in the working directory.

Okay, seems to work now. Now I know how to write the file pat for the location of the set working directory. Thanks

One thing that always trips me up- if you’re on Windows and copying a path from File Explorer, make sure to flip the backslashes \ to forward slashes / (or use double backslashes \). R gets very confused by the single backslash.