Reading excel data sheet

I have an excel data sheet that I need to be read as a table but the read.csv function keeps outputing that I do not have permission. I do not know how to fix it.

mydata <- read.csv("my-path-to-my-sheet")


Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'my-path-to-my-sheet': Permission denied

Hi, does the file path refer to the right location? Is it a .csv file or a .xlsx file?

If it is an excel file, you might want to try readxl:

Read Excel Files • readxl (

And make sure you add the file extension: .csv or .xlsx

I got it, thank you!

This topic was automatically closed 42 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.