SQL guide

Run SQL on Excel workbooks

An Excel workbook often contains more detail than you need. Register an XLSX worksheet as a table to filter rows, calculate summaries and reuse the same query with a similarly structured workbook.

  1. Register the workbook

    In Workspace, add the XLSX file and open its worksheet. Use the table alias shown in the explorer. The first non-empty row supplies the column names.

  2. Inspect the fields

    Use a small SELECT preview to confirm headings and types. Formula cells use cached values. Recalculate and save the workbook in Excel before importing if you need fresh formula results.

  3. Summarize and export

    Group by the business dimension you want to compare. Review totals against the workbook before exporting the result.

Example query

SELECT region, SUM(total) AS sales
FROM sales_sheet
GROUP BY region
ORDER BY sales DESC;

This example assumes a worksheet alias of sales_sheet and columns named region and total. Replace them with the names from the explorer.