BinaryFormat.UnsignedInteger32
BinaryA binary format that reads a 32-bit unsigned integer.
Syntax
BinaryFormat.UnsignedInteger32(binary as binary) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
binary | binary | Yes | The binary data to read the 32-bit unsigned integer from. |
Return Value
function — A binary format function that reads a 4-byte unsigned integer from binary data.
Remarks
BinaryFormat.UnsignedInteger32 is a binary format specifier that reads a 32-bit (4-byte) unsigned integer from binary data. The value range is 0 to 4,294,967,295 (UInt32 / uint).
The default byte order is little-endian (least significant byte first). Use BinaryFormat.ByteOrder to wrap this format if the source data uses big-endian byte ordering.
This format is widely used in binary file formats for sizes, offsets, counts, magic numbers, and other 32-bit unsigned values. Many file format headers (e.g., PNG, ZIP) use unsigned 32-bit integers extensively.
Examples
Example 1: Read a 32-bit unsigned integer
let
binaryData = #binary({0x01, 0x00, 0x00, 0x00}),
result = BinaryFormat.UnsignedInteger32(binaryData)
in
resultExample 2: Read a larger 32-bit unsigned integer
let
binaryData = #binary({0x00, 0x00, 0x01, 0x00}),
result = BinaryFormat.UnsignedInteger32(binaryData)
in
resultCompatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks