Skip to content
Rodrigo Celso de Lima Porto edited this page Jan 13, 2026 · 6 revisions

Extracts files from a ZIP archive and returns a table of entries with file names and decompressed content.

Syntax

Binary.Unzip(
    ZIPFile as binary
) as table

Parameters

  • ZIPFile β€” A binary containing a ZIP archive (for example, the result of File.Contents).

Return Value

A table with the following columns:

  • FileName (text) β€” The entry name inside the ZIP.
  • Content (binary or null) β€” The decompressed file content; null if decompression failed or entry unsupported.

Example

Binary.Unzip(File.Contents("C:\Temp\archive.zip"))

This yields a table you can expand or transform. To read the content of the first file as text:

let
    Files = Binary.Unzip(File.Contents("C:\Temp\archive.zip")),
    FirstBinary = Files{0}[Content],
    FirstText = if FirstBinary <> null then Text.FromBinary(FirstBinary) else null
in
    FirstText

Credits

Clone this wiki locally