Lines.ToBinary

Updated on

Lines.ToBinary is a Power Query M function that converts a list of text into a binary value using a specified encoding and lineSeparator. The function returns a binary value with the specified lineSeparator appended to each line.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Lines.ToBinary(
   lines as list,
   optional lineSeparator as nullable text,
   optional encoding as nullable number,
   optional includeByteOrderMark as nullable logical,
) as binary
Argument Attribute Description
lines
lineSeparator optional
encoding optional Uses the TextEncoding.Type to specify the text’s binary encoding format. By default, if not provided, the argument uses TextEncoding.Utf8 (UTF8 binary form). Other available options are:
TextEncoding.Unicode: use the UTF16 little-endian binary form.
TextEncoding.Utf16: use the UTF16 little-endian binary form.
TextEncoding.BigEndianUnicode: use the UTF16 big endian binary form.
TextEncoding.Windows: use the Windows binary form.
TextEncoding.Ascii: use the ASCII binary form.
includeByteOrderMark optional

Description

Converts a list of text into a binary value using the specified encoding and lineSeparator.The specified lineSeparator is appended to each line. If not specified then the carriage return and line feed characters are used.

Other functions related to Lines.ToBinary are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/lines-tobinary

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy