Commit Graph

2 Commits

Author SHA1 Message Date
Hugh A Miles II
3602619e98 fix(dashboard): address Excel export review feedback
Addresses PR #41133 review comments:
- Blank/stringify non-finite and out-of-range Decimal cells instead of
  crashing xlsxwriter (shared _coerce_float_cell helper).
- Detect formula-injection prefixes behind leading whitespace via
  _quote_if_formula (lstrip before checking).
- Correct the module docstring to scope the constant-memory guarantee to
  the writer side (source rows may be materialized upstream).
- Append a "[Truncated: ...]" notice row when a sheet exceeds Excel's
  per-sheet row cap so dropped rows are visible.
- Note AWS S3's 7-day pre-signed URL cap on EXCEL_EXPORT_LINK_TTL_SECONDS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:22:41 -04:00
Hugh A Miles II
7668f4d75c feat(export): streaming xlsx writer with sheet-name sanitization
Add StreamingXlsxWriter, a constant-memory xlsxwriter wrapper that writes one
sheet per chart row-by-row, so multi-chart dashboard exports never hold more
than one row per sheet in memory. Includes sheet-name sanitization (forbidden
chars, 31-char cap, reserved 'History', case-insensitive de-duplication) and
per-cell sanitization (formula-injection quoting mirroring excel.quote_formulas,
Excel int/float precision limits, ISO temporal rendering). Reuses the neutral
document properties from utils.excel. Adds unit tests with an openpyxl
round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 09:58:22 -07:00