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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Gozde
Helper I
Helper I

Export Table via R script (Power Query)

Hello,

 

I am working on a report. I should get some data export from Power Query via R script.

 

I am using a code of write.table.

 

But, I am getting error: DataSource.Error: ADO.NET: R script error.

 

Can you help me with a sample code for csv or xlsx?

 

Thank you!

 

Gozde

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Gozde

 

You should do it in R visual to execute your "export data" R script. Make your install proper packages and assign permission to those packages on file. For more details, please refer to article below:

 

Export dataset into a file from Power BI Desktop using R script

 

Regards,

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Gozde

 

You should do it in R visual to execute your "export data" R script. Make your install proper packages and assign permission to those packages on file. For more details, please refer to article below:

 

Export dataset into a file from Power BI Desktop using R script

 

Regards,

Thank you very much 🙂

 

It solved my problem! I already installed the packages and R. However I should go Power BI instead of power Query and my directory was totaly wrong!

 

Best regards,

Gozde

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.