Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

R auto save issue

Hi everyone, I have an issue in adding the below to my query steps.

 

write.csv(dataset, file = "C:/Users/XXXX/Desktop/dataset.csv")

 

whenever I run it, it displays another empty table with column names Name and Value.

 

 

Here's the query if it will help 🙂 let Source = Excel.Workbook(File.Contents("\\USMFXXXXXL1C\DataAll\WeekID.xlsx"), null, true), WeekIndex_Table = Source{[Item="WeekIndex",Kind="Table"]}[Data], #"Changed Type" = Table.TransformColumnTypes(WeekIndex_Table,{{"Week Ending DATE", type date}, {"Week Number", Int64.Type}, {"Hours", Int64.Type}}), #"Run R script" = R.Execute("# 'dataset' holds the input data for this script#(lf)require('gdata')#(lf)write.csv(dataset, file = ""C:/Users/XXXXX/Desktop/dataset.csv"")",[dataset=#"Changed Type"]) in #"Run R script"

2 Replies