Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi Community, I am trying to connect an R Script to my Power BI Desktop and I get this error in every attempt:
The ADO.NET error I get is "The request is not supported" which is not the same as -> ADO.NET: Rscript error - Cannot find Dataset
In the past I have been able to connect an R Script to Power BI under R's 3.5.2 version. I am currently using R 4.0.3, when that did not work, I went back and installed R 3.5.2, but that also did not work.
I read that specificing the library path in the code would work, but I had no such luck.
- Example code: library(dyplr, lib.loc = "\\\\example_server/FolderRedirection/my_name/My Documents/R/R-4.0.3/library")
The only other thing I can think of is Power BI cannot read the path of my working directory. My script is set up to pull a list of excell files from a folder so it can aggregate them into one dataframe that will be used in Power BI. Could Power BI be having trouble following the directory path I have set up that brings in my data? If so, how can I address that?
I would appreciate any help in this matter! Thanks again.
Hi @Anonymous ,
I guess it is due to your script error, try the following script:
setwd('<Your file path e.g.C:/Users/files>')
library(tidyverse)
library(readxl)
files = list.files("<Your file path e.g.C:/Users/files/>", pattern = "xlsx", full.names = TRUE)
df = map_dfr(files, read_xlsx)
df
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
In Power Query you can easily merge multiple excels in a file.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.