Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
perezm27
New Member

R Script readxl error

Hello, I am still fairly new to Power BI and mainly have been using it on the desktop app but I am having some issues with the online service. In the R script editor I am using the readxl package to read in excel files as dataframes which I am then using to make my visualizations. It all works fine in Desktop but I get a script runtime error that reads:

 

Error in read_fun(path = path, sheet = sheet, limits = limits, shim = shim, : Evaluation error: zip file 'C://Users//perezm27//Documents//data.xlsx' cannot be opened.

 

The file is not open anywhere and it is not zipped. You can review the code I used to pull it down below:

data <- read_xlsx("C://Users//perezm27//Documents//data.xlsx", 1)
 
If anyone were to have any leads on where I'm going wrong please let me know! 
 
Thank you!
2 REPLIES 2
lbendlin
Super User
Super User

try with single forward slashes.

Sorry for the late reply. Forward slashes does get rid of the error code but the only thing is now it's telling me "Couldn't retrieve the data for this visual" which I assume means that it is not creating that dataframe from the function. 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.