Skip to content

Instantly share code, notes, and snippets.

View ImkeF's full-sized avatar

Imke Feldmann ImkeF

View GitHub Profile
@ImkeF
ImkeF / ExportCsv.pq
Last active March 26, 2019 20:13
M functions
// Exports the current table to csv. Pass full PathFile specification as parameter
(path as text, dataset as table) =>
let
ConvertedPath = Text.Replace(path, "\", "/"),
RScript = R.Execute("write.csv(dataset,"""&ConvertedPath&""")
output <- dataset
",[dataset=dataset]),
output = RScript{[Name="output"]}[Value]
in
output