I have a problem importing using read_excel

read_xlsx("D:/docs/Sample.xlsx") this is my code
Error: path does not exist: ‘D:/docs/Sample.xlsx’ and this is the error message

I have not used windows in years but the first thing to do is be sure the file exists.

Is the file name "exactly" the same as in the command. R is case-sensitive so "Sample.xlsx" and "sample.xlsx" are two completely different files.

Next, try importing the file using the "import dataset" button. If that works, we will know it exists and we have a path problem.


Wht @jrkrideau said, with one small exception. Filenames in Windows are not case sensitive. (Although it is a good idea to act as if they are in case your code ever needs to run elsewhere.)

They are not? Well I have not used Windows in 12-15 years so I guess my memory is a bit off.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.