
Locking Down Shared Input Sheets Without Breaking Them
Lock a shared Excel input sheet so people can enter data but not break it: protect the sheet, allow the right actions, handle tables, keep a master.
Tag
590 posts

Lock a shared Excel input sheet so people can enter data but not break it: protect the sheet, allow the right actions, handle tables, keep a master.

Check an incoming Excel workbook against a template in Python: headers, column types, required cells, allowed values, duplicates and a clear report.

Use Excel tables for data entry: automatic expansion, calculated columns, structured references, validation that follows new rows, and reading tables by name.

Protect Excel formula cells from accidental edits: lock cells, protect the sheet, allow sorting and filters, hide formulas, and set it up from code.

Control what goes into a shared spreadsheet: templates, data validation, tables, protection, error flags and import checks that stop bad data at the source.

Avoid misleading axes in Excel charts: start bars at zero, set scales on purpose, avoid dual axes, use consistent scales across charts and label the units.

Export charts as PNG or SVG from a script: draw with matplotlib from the same data, render headless with LibreOffice, or use Windows COM.

Build an Excel dashboard from SQL output: one data sheet per query, a presentation sheet of tiles and charts, scheduled refresh and tie-out checks.

Add sparklines, data bars, color scales and icon sets to a table so readers can scan 40 rows in seconds, written from XlsxWriter with accessible choices.

Deep-merge a base and an override with yq eval-all, choose whether lists replace or append, and check what a null or an empty value in the override does.

Load YAML, validate it with pydantic models and get every error with its path. The Norway problem caught, extra keys rejected and ranges enforced.

A YAML file can hold several documents separated by three dashes. safe_load fails on them, safe_load_all reads them and safe_dump_all writes them.