Binary.FromList

Binary

Converts a list of byte numbers (0-255) into a binary value.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Binary.FromList(list as list) as binary

Parameters

NameTypeRequiredDescription
listlistYesA list of numbers (each 0 to 255) representing individual bytes.

Return Value

binaryA binary value created from the list of byte values.

Remarks

Binary.FromList converts a list of numbers into a binary value. Each number in the list represents a single byte and must be in the range 0 to 255. This is the inverse of Binary.ToList.

This function is useful for constructing binary data byte-by-byte, such as building custom binary headers or protocol messages.

Examples

Example 1: Create a binary from a list of bytes

let
    Bytes = {72, 101, 108, 108, 111},
    AsBinary = Binary.FromList(Bytes),
    AsText = Text.FromBinary(AsBinary)
in
    AsText
Applied Steps

Converts the binary value back to text, yielding "Hello".

Value
1Hello

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks