Back to Snowflake Basic in Excel
SheetXAI logo
Snowflake Basic logo
Snowflake Basic · Excel Guide

Export a Snowflake Table Inventory With Row Counts and Sizes Into an Excel workbook

2026-05-14
5 min read

The Scenario

Your team got hit with an unexpected Snowflake bill last month — significantly higher than the prior quarter. Nobody knows which tables are driving it. The data team has asked for a full inventory of every table in PROD.PUBLIC, sorted by size, so they can identify compression and archival candidates before the next billing cycle closes.

You're the person who was handed the workbook and told to fill it in. You have access to Snowflake and a blank Excel workbook.

The bad version:

  • Open the Snowflake UI, navigate to PROD.PUBLIC, and start clicking on individual tables to see their row counts and byte sizes in the properties panel.
  • Write each table name, row count, and size into the workbook by hand, one at a time, for however many tables are in the schema — maybe 80, maybe 200.
  • Lose your place around table 60, go back and recheck three entries, and discover you misread a size that was in megabytes instead of bytes.

There are better uses of the next two hours. This is a structured enumeration task, and doing it by hand introduces exactly the kind of transcription error that will make the optimization report unreliable.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook. It can query Snowflake's information schema to pull table metadata — row counts, byte sizes, names — and write the structured inventory directly into your workbook.

Paste this into the SheetXAI sidebar:

List all tables in Snowflake database PROD schema PUBLIC with their row counts and sizes in bytes, then write table_name, row_count, and size_bytes into columns A, B, and C of this sheet sorted by size_bytes descending

What You Get

  • Row 1 with headers: table_name, row_count, size_bytes
  • All tables in PROD.PUBLIC listed from largest to smallest by byte size
  • Numeric values in columns B and C, not text, so you can sum and filter them directly
  • If a table has no size data yet (recently created, no rows), it appears with 0 in the relevant columns

What If the Data Is Not Quite Ready

You want to flag the largest tables so they're immediately visible

List all tables in Snowflake database PROD schema PUBLIC with row counts and sizes, write table_name, row_count, and size_bytes into columns A–C sorted descending by size_bytes, and add 'LARGE' in column D for any table with more than 100 million rows

You need sizes in megabytes instead of bytes for readability

List all tables in Snowflake PROD.PUBLIC with their row counts and sizes — convert size_bytes to megabytes (rounded to 1 decimal place) and write table_name, row_count, and size_mb into columns A–C of this Excel sheet, sorted by size_mb descending

You need to cover multiple schemas in one inventory

List all tables across PROD.PUBLIC, PROD.ANALYTICS, and PROD.STAGING with their row counts and sizes in bytes — write database_name, schema_name, table_name, row_count, and size_bytes into columns A–E sorted by size_bytes descending

You need to compare current sizes against last month's snapshot in the workbook and flag growth

Look at the table names and sizes from last month listed in columns A and B of the Baseline worksheet, then pull current row counts and sizes from Snowflake PROD.PUBLIC for the same tables — write table_name, prior_size_bytes, current_size_bytes, and a growth percentage into columns A–D of the Current worksheet, and flag any table that grew more than 50% with 'REVIEW' in column E

One prompt handles the comparison, the calculation, and the flag in a single pass.

Try It

Get the 7-day free trial of SheetXAI and open the Excel workbook where your storage cost analysis lives, then ask it to pull the full table inventory from Snowflake sorted by size. You can also explore generating a data dictionary from Snowflake or return to the Snowflake overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more