Replace build_excel() with populate_template(): loads app/tools/eib/eib_pre_template.xlsx fresh each run, writes EIB rows into Final Sheet A2:I<n+1> (clearing prior run's rows first) and the audit table starting at column AA, then saves a dated copy into outputs/ — the template itself is never mutated. Columns J:Y (finance's own corporate-card-ID lookup formulas and a legacy static block) are never written to; _extend_formulas_down() only fills in a missing J:M formula within the new data range (the template's formula rows turned out to be non-contiguous, leftover from old manual test batches) without ever touching a row that already has one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| eib_pre_template.xlsx | ||
| logic.py | ||
| routes.py | ||