
Version Controlling the Query Behind an Excel Report
Keep the SQL behind an Excel report in Git: one file per query, parameters, reviewed changes, tests, and the commit hash written into the workbook.
Where the business keeps its data. Reading workbooks, taming dates and formulas, and moving sheets to and from a database.

Keep the SQL behind an Excel report in Git: one file per query, parameters, reviewed changes, tests, and the commit hash written into the workbook.

Add a README sheet to every generated workbook with the period, source, definitions, checks and version, written by the same code that builds the report.

Handle currency and locale in generated workbooks: store numbers, set format codes, name the currency and know what the reader's settings change.

Round and format numbers for finance readers: store exact values, round once on purpose, use number formats for display and make displayed totals add up.

Produce a monthly management pack from SQL: fixed sheets, prior month and budget comparisons, checks that tie out, and a scheduled build with sign off.

Write Excel conditional formatting from Python with XlsxWriter or openpyxl: value rules, color scales, data bars and formula rules, with tests.

Send charts from a SQL query to an Excel sheet by script: write the data, add a native chart with XlsxWriter or openpyxl, size it and label it.

Design a report query before opening Excel: fix the grain, avoid join fan-out, put rules in SQL, bind parameters and test totals against a trusted number.

Build Excel reports from SQL that readers trust: design the query, write sheets, formats and charts from code, check totals, version the query, schedule it.

Export a Google Sheet to CSV or xlsx from a script using the export URL, the Drive API or gspread, choose the sheet by gid and handle sharing and auth safely.

Turn a worksheet into a Markdown or HTML table for documentation with pandas, escape pipes and line breaks, align numbers and keep wide tables readable.

Turn a worksheet into SQL INSERT statements that quote text, handle NULLs and dates, and load in batches, or skip the script and use COPY or a driver.
We send one email when a new article is published. No spam.