Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Created June 3, 2017 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hugoberry/918dc2131ee7389fa351b7c420307669 to your computer and use it in GitHub Desktop.
Save Hugoberry/918dc2131ee7389fa351b7c420307669 to your computer and use it in GitHub Desktop.
Using R.Execute() in Power Query to export the contents of a table to CSV
let
seed = {1..1000000},
path = "d:\\Downloads\\out.csv",
seedTable = Table.FromList(seed, Splitter.SplitByNothing()),
RScript = R.Execute("write.csv(dataset,"""&path&""")",[dataset=seedTable]),
out = RScript
in
out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment