Skip to content

Instantly share code, notes, and snippets.

@Hugoberry
Last active April 11, 2017 09:16
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/db298aaf80b26460a315060888704ca4 to your computer and use it in GitHub Desktop.
Save Hugoberry/db298aaf80b26460a315060888704ca4 to your computer and use it in GitHub Desktop.
Dummy table serialized as XML binary
let
//Transform each row of [dummy] table into a binary XML
rows = Table.TransformRows(dummy,
each Binary.Combine({Text.ToBinary("<row><key>")
,Text.ToBinary(Text.From([key]))
,Text.ToBinary("</key><value>")
,Text.ToBinary([value])
,Text.ToBinary("</value></row>")})),
//Wrapping up all the rows in <table> tags
out = Binary.Combine({Text.ToBinary("<table>")}&
rows&
{Text.ToBinary("</table>")})
in
out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment