Unify Applications
Logo
Sheet Preview

Sheet Preview

Logo

5 mins READ

Overview

The Sheet Preview block renders a spreadsheet file — .xlsx, .xls or .csv — as a read-only sheet viewer inside your app, with sheet tabs, headers and cells. You point it at a file by URL (usually a binding) or Upload one directly in the builder. You can style header and body cells, including conditional colors driven by each cell's value, row, column or sheet. Viewers can read the sheet but cannot edit cells.

sheet_preview.png
sheet_preview.png

Note: Use the Table block when you want interactive rows with sorting, selection and actions. Use Sheet Preview when the source is a spreadsheet file and you just want users to see its contents without downloading it.

Sheet Sources

Sheet Source

Description

What you set

URL (default)

A link to an .xlsx, .xls or .csv file — for example a pre-signed cloud-storage link returned by a data source.

Sheet URL (bindable)

Upload

One .xlsx, .xls or .csv file uploaded and stored in the builder.

Sheet (one file)

Warning: Files added with Upload are stored as public assets — anyone with the file's link can download it, whether or not they can see the page. Don't upload confidential spreadsheets; serve them through an access-controlled URL instead.

Properties Reference

Content

Property

Default

Description

Data → Sheet Source

URL

Where the spreadsheet comes from: URL or Upload.

Data → Sheet URL

—

The spreadsheet's URL. Paste a link or bind it to a data source result. Appears when Sheet Source is URL.

Data → Sheet

—

Upload one .xlsx, .xls or .csv file. Appears when Sheet Source is Upload.

Appearance

Property

Default

Description

Cell

—

Text color and background color for body cells. Each can be conditional.

Header

Primary text on a light brand background

Text color and background color for the header row. Each can be conditional.

Visibility

Always visible

Show or hide the whole block based on a condition.

Styles

Max height 640px

Width, height, layout, margin, padding and other style settings. Long sheets scroll inside the block.

Sheet Preview has no events and no methods.

Cell Context for Conditions

When you write a condition for a Cell or Header color, you can refer to the cell being styled. In the keys below, sheetPreview1 is the block's ID — replace it with your own block's ID:

Key

Description

Works in

{{ sheetPreview1.context.currentSheet.index }} / .name

The sheet the cell is on

Cell and Header

{{ sheetPreview1.context.currentColumn.index }} / .name

The cell's column

Cell and Header

{{ sheetPreview1.context.currentRow.index }} / .values

The cell's row and its values

Cell only

{{ sheetPreview1.context.currentCell.value }}

The cell's value

Cell only

Sheet and column keys work in Cell and Header conditions. Row and cell keys work in Cell conditions only. These keys work only inside this block's own color conditions. Other blocks can't bind to them.

Setting Up a Report Preview

  1. Get the file URL: Add a data source that returns the report file's URL (for example, a pre-signed link to the file in cloud storage).

  2. Drop the Sheet Preview block: Drag Sheet Preview onto the canvas and keep Sheet Source = URL.

  3. Bind the URL: Bind Sheet URL to the file URL from your data source. To show a fixed file instead, set Sheet Source to Upload and add the file under Sheet.

  4. Set the height: Under Styles, adjust the max height so long sheets scroll inside the block.

  5. Add a download button alongside: Place a Button block next to the Sheet Preview. In its On Click, add the Download File action and set its URL to the same file URL, so viewers can download the full file.

Examples

Example: Highlight negative values

Under Appearance → Cell, add a condition to Text Color that checks {{ sheetPreview1.context.currentCell.value }} is below zero and sets the color to red.

Example: Template preview before download

Show a read-only preview of a configuration template (CSV or Excel) stored in cloud storage. Bind Sheet URL to a pre-signed URL generated by an API call. Place a "Download template" button next to the block that opens the same URL.

Behavior & Gotchas

Warning: Large files may be slow to load. The block loads and parses the whole file in the browser. For very large files, consider importing the data and showing it in a Table instead — Sheet Preview is meant for human-readable reports, not bulk data views.

Warning: Web apps only. Sheet Preview is available in web apps only. It isn't available in mobile apps.

Page

Relationship

Table

Use when data comes from a query result and you need sorting, selection and actions

Media, PDF Viewer & Lottie

PDF Viewer for reviewing reports in PDF format rather than a spreadsheet grid