Unify Logo Footer.svg
Unify Applications
Logo
Sheet Preview

Sheet Preview

Logo

5 mins READ

Overview

The SheetPreview block loads spreadsheet content from a file URL, connected data source, or Google Sheets integration and renders it as a non-editable spreadsheet grid within the page layout. Viewers can scroll, search, and (if enabled) freeze rows and columns — but cannot edit cells. This makes it suitable for displaying financial reports, audit data, configuration templates, and any tabular data that originates as a spreadsheet and should be reviewed in its native grid format rather than re-modeled into a Data Table.

Note: Use the Data Table block when you want to bind data source query results with filtering, sorting, and inline editing. Use Sheet Preview when the source is a spreadsheet file and you want to preserve its original layout, cell formatting, merged cells, and column widths exactly as authored.

Supported Data Sources

Source TypeDescriptiondataSource Format
Attachment Data SourceAn uploaded file attachment bound to a data source — Excel (.xlsx, .xls) or CSV.Data source ID (e.g. ds_report_file)
Google Sheets connectorA connected Google Sheets spreadsheet via the Google Sheets integration.Connector reference ID
S3 / Azure Blob URLA direct HTTPS URL to an Excel or CSV file in cloud storage. Must be publicly accessible or have a pre-signed URL.HTTPS URL (bindable)
Inline CSVA raw CSV string passed directly — useful for small, static datasets or dynamic CSV generated by an expression.CSV string (bindable)

Properties Reference

PropertyTypeDefaultDescription
dataSourcestring (bindable)The source of the spreadsheet data. Accepts a data source ID, connector reference, direct HTTPS URL, or inline CSV string. Required.
sheetstring | number0 (first sheet)For multi-sheet files (Excel with multiple tabs or Google Sheets with multiple sheets): a sheet name (string) or zero-based sheet index (number). Ignored for CSV files.
rangestring (A1 notation)Restrict the visible content to a specific cell range. Example: "A1:H50" shows only columns A–H and rows 1–50. When unset, the entire sheet is displayed.
showHeadersbooleantrueShow the first row of the data as a sticky header. The header row is visually distinguished (bold, background) and remains visible while scrolling.
frozenRowsnumber0Number of rows to freeze at the top. These rows remain visible when scrolling vertically. Set to 1 to freeze the header row when showHeaders = false (i.e., the header is part of the data).
frozenColsnumber0Number of columns to freeze on the left. These columns remain visible when scrolling horizontally.
heightstring (CSS)"400px"Fixed height of the grid container. Supports any CSS length value ("300px", "60vh"). The grid scrolls internally when content exceeds this height.
allowSearchbooleanfalseShow a search bar above the grid. Typing highlights matching cells and scrolls to the first match. Search operates client-side on the loaded data.
highlightFormulasbooleanfalseCells containing formulas are highlighted with a distinct background tint. Useful for audit reviews where formula cells need to be quickly identified.
loadingboolean (bindable)autoDisplays a skeleton loading state. Auto-detects loading from the data source. Override to true/false if using a direct URL that doesn't have automatic loading state.
errorMessagestringautoMessage shown when the spreadsheet fails to load (e.g., invalid URL, unsupported format). Leave blank for the default error display.
onCellClickaction chainFires when the user clicks a cell. Payload: { row: number, col: number, value: any, address: string }. Use to show cell details in a tooltip or navigate to a related record.

Setting Up a Financial Report Preview

  1. Upload the report file: Add an Attachment data source (Section 6 → Data Sources → Add Attachment) and bind it to the Excel report. The data source ID becomes the dataSource value.

  2. Drop the SheetPreview block: Drag SheetPreview onto the canvas. Set Data Source to the attachment data source ID (e.g. ds_q3_report).

  3. Configure sheet and range: Set Sheet = "Summary" (the sheet tab name in the Excel file). Set Range = "A1:N40" to display only the summary section, hiding raw data worksheets. Enable Show Headers = true and Frozen Rows = 1.

  4. Add search and formula highlighting: Enable Allow Search = true for auditor convenience. Enable Highlight Formulas = true to call out formula cells in the preview. Set Height = "500px".

  5. Add a download button alongside: Place a Button block below the SheetPreview with an Export File action pointing to the same attachment data source. This lets the viewer download the full Excel file while reviewing the preview in-app.

Examples

Example: Google Sheets live preview

Connect the Google Sheets integration and bind Data Source to the connector reference ID. Set Sheet = 0 (or the tab name). The block fetches live data from Google Sheets each time the page loads. Add a Refresh button that calls a Refresh Data Source action to pull the latest version without reloading the page.

Example: Template preview before download

Show a read-only preview of a configuration template (CSV or Excel) stored in S3. Bind Data Source to a presigned URL generated by an API call. Use Range = "A1:F20" to show the structure without exposing all rows. Place a "Download template" button next to the block wired to a direct file download action.

Behavior & Gotchas

⚠ Merged cells render as single wide cells

Excel merged cells are preserved visually — the merged region renders as a single cell spanning multiple columns/rows. However, the onCellClick payload uses the top-left cell address of the merged region regardless of which part the user clicks.

⚠ Formula values, not formula syntax

SheetPreview renders computed cell values, not formula syntax. If a cell contains =SUM(A1:A10), the grid shows the computed total. Enable Highlight Formulas to visually flag which cells contain formulas when showing the file to auditors who need to know which cells are calculated.

⚠ Large files (5000+ rows) may be slow to load

The block loads and parses the entire file in the browser. For large Excel files, use the Range property to restrict loading to a specific section. For very large CSVs (>100,000 rows), consider importing data into a database and using a Data Table instead — SheetPreview is optimized for human-readable reports, not bulk data views.

PageRelationship
Data TableUse when data is from a query result and you need filtering, sorting, and editing
iFrame & Code EditorAlternative for embedding full Google Sheets UI via iframe when live editing is needed
Media, PDF & LottiePDF Viewer for report review in PDF format rather than spreadsheet grid