OpenBI Docs Buy

Lines.ToText

A list of lines joined into one text, each line followed by a line break.

Group: Binary and lines. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Lines.ToText(lines as list, optional lineSeparator as nullable text) as text
ParameterTypeDescription
lineslistThe lines, as texts.
lineSeparatornullable text
optional
What ends each line. Left out, a carriage return and line feed, as in Windows.

Returns

text. The lines in one text, the last line ended too.

Remarks

  • Unlike Text.Combine, the separator also comes after the last line, as in a text file.

Examples

Windows line breaks

Lines.ToText({"Oslo", "Bergen", "Trondheim"})
"Oslo#(cr,lf)Bergen#(cr,lf)Trondheim#(cr,lf)"

Line feeds only

Lines.ToText({"Oslo", "Bergen"}, "#(lf)")
"Oslo#(lf)Bergen#(lf)"

Lines.FromText, Text.Combine, Text.ToBinary.

Last updated · OpenBI Studio 0.3.79