
Freezing Panes Filters and Column Widths From Code
Freeze the header row, add filter buttons and set column widths from Python with openpyxl and XlsxWriter, including an auto-width helper and print settings.
Where the business keeps its data. Reading workbooks, taming dates and formulas, and moving sheets to and from a database.

Freeze the header row, add filter buttons and set column widths from Python with openpyxl and XlsxWriter, including an auto-width helper and print settings.

Write Excel formulas and number formats from Python with openpyxl and XlsxWriter: English syntax, cached values, table references, percent and date codes.

Build one Excel workbook from several SQL queries: a summary sheet, a sheet per region, formulas that point across sheets and an index with working links.

Export a MySQL query to a clean XLSX with PyMySQL and pandas, handling DECIMAL, zero dates, tinyint flags and utf8mb4, and compare it with Workbench.

Export SQL Server query results to XLSX with pyodbc and pandas, and see what SSMS, bcp and the Import and Export Wizard give you instead.

Format a pandas DataFrame in Excel with XlsxWriter: header style, number and date formats, auto-fit widths, a table with banding and conditional formatting.

Excel on Windows often shows UTF-8 accents as à symbols. Add a BOM when you write the file, or import it with the right encoding, and check the bytes first.

Run a PostgreSQL query from Python and write an Excel file with correct types, converting timestamptz, numeric and ids so the workbook opens cleanly.

Export SQL results to Excel that open cleanly: keep types and dates, carry formatting, use several sheets, resist formula injection and run on a schedule.

Prove an Excel import lost nothing by counting rows at the source, the stage and the target, adding control totals, and reconciling rejects in one query.

Three invisible bytes at the start of a CSV can fix Excel or break a header match. See which readers strip a BOM and how to add or remove one.

Design a staging table for Excel loads with text columns and provenance, load it fast, profile it with SQL and keep or drop it on a retention rule.
We send one email when a new article is published. No spam.