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

Run a Snowflake SQL Query and Paste Results Into a Excel workbook

2026-05-14
5 min read

The Scenario

It's Thursday afternoon and the finance team has been waiting since Tuesday for last month's revenue breakdown. The request was simple enough when it came in: region, product SKU, total ARR, account count, April 2026, top 1,000 rows by ARR. You know exactly which Snowflake table it lives in. You know the query.

What you don't have is a clean path from that knowledge to a populated Excel worksheet.

The bad version:

  • Open SnowSight, write the SELECT, wait for the warehouse to resume, export the result as CSV
  • Open the CSV in Excel, copy the four columns finance actually needs, paste into the right worksheet, fix the underscore-formatted headers
  • Send it over. Get a reply: "Can you filter to North America only and resort by account count?" Start from the top.

You're not paid to be a CSV relay. Finance needs this to be a live, rerunnable query — not a snapshot rebuilt from scratch every time someone adjusts the filter.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It reads the workbook, connects to Snowflake through its built-in integration, runs your SQL, and writes the result set directly into the cells you point it at — column headers included, types intact.

Open the finance reporting worksheet, then paste this into the SheetXAI sidebar:

Query Snowflake DB PROD_DW schema PUBLIC for all rows in the CHURN_EVENTS table where event_date >= '2026-01-01', then write region, account_id, churn_reason, and mrr_lost into columns A–D of this Excel sheet

What You Get

  • Column headers in row 1: region, account_id, churn_reason, mrr_lost
  • All matching rows written into A2 onward, typed correctly — strings as strings, numbers as numbers
  • No import wizard, no manual formatting pass, no clipboard involved
  • If the query hits a suspended warehouse or a permissions error, SheetXAI surfaces it in the sidebar

What If the Data Is Not Quite Ready

The column names in Snowflake use underscores but the workbook needs clean labels

Query Snowflake DB PROD_DW schema PUBLIC, table CHURN_EVENTS, for all rows where event_date >= '2026-01-01', rename columns as Region, Account ID, Churn Reason, MRR Lost — write into columns A–D of this Excel sheet with headers in row 1

The query needs a bounded date range rather than an open-ended filter

Query Snowflake PROD_DW.PUBLIC.CHURN_EVENTS for rows where event_date is between '2026-01-01' and '2026-03-31' inclusive, write region, account_id, churn_reason, event_date, and mrr_lost into columns A–E of this Excel sheet with headers in row 1

The result needs to join churn events with an accounts table to get company name

Run this on Snowflake (DB: PROD_DW, schema: PUBLIC, warehouse: COMPUTE_WH): SELECT e.region, e.account_id, a.company_name, e.churn_reason, e.mrr_lost FROM CHURN_EVENTS e LEFT JOIN ACCOUNTS a ON e.account_id = a.id WHERE e.event_date >= '2026-01-01' ORDER BY e.mrr_lost DESC — write into columns A–E of this Excel sheet with headers in row 1

Filter out test accounts, exclude nulls, and write a clean final set

Query Snowflake PROD_DW.PUBLIC.CHURN_EVENTS for 2026 Q1, exclude rows where account_id contains 'test' or mrr_lost is null, keep region, account_id, churn_reason, and mrr_lost, sort by mrr_lost descending — write into columns A–D with headers in row 1

The pattern: conditions and cleanup travel in the same prompt — you're not doing a second cleaning pass after the data lands.

Try It

Get the 7-day free trial of SheetXAI and open any Excel workbook where you're waiting on a Snowflake result set. Point it at the table, describe the columns you need, and let it handle the query and the write. For related tasks, see how to build a full Snowflake data catalog or check the Snowflake integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more