Skip to content

Support multi-sheet workbooks#7

Merged
migmcc merged 1 commit into
mainfrom
feat/multi-sheet
Jun 21, 2026
Merged

Support multi-sheet workbooks#7
migmcc merged 1 commit into
mainfrom
feat/multi-sheet

Conversation

@migmcc

@migmcc migmcc commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Implements #4 — read a chosen worksheet from a multi-sheet .xlsx.

Scope

  • New optional CLI flags: --pfmea-sheet, --control-plan-sheet (select a worksheet by name).
  • Threaded through parse_pfmea / parse_control_plan / check_files via an optional sheet arg.
  • When omitted → the active sheet is used (unchanged v0.1/v0.2 behaviour).
  • Missing sheet → clear ParseError listing the available sheet names.
  • Header auto-detection still applies to the selected sheet.
  • Works with both Markdown and JSON output.

Tests (9 new, 63 total)

  • Explicit sheet selection for PFMEA and Control Plan.
  • Missing-sheet error lists available sheets (parser + CLI exit code 2).
  • Default (no sheet) stays backwards-compatible.
  • Header auto-detection on a selected sheet (leading title row).
  • CLI Markdown and JSON with explicit sheets.

Limits (unchanged)

.xlsx-only, selection by name (no index). No CSV, no configurable mapping, no change to scoring / matching / finding types / JSON schema.

Checklist

  • parser + pipeline + CLI flags
  • tests (selection, errors, default, header auto-detect, md + json)
  • ruff + pytest green (63 tests)
  • CI green on branch

Closes #4.

Add optional --pfmea-sheet / --control-plan-sheet to select a worksheet by name
in multi-sheet .xlsx files. When omitted, the active sheet is used (unchanged
default). A missing sheet raises a clear ParseError listing the available sheet
names; header auto-detection still applies to the selected sheet.

Threaded through parse_pfmea / parse_control_plan / check_files. No change to
scoring, matching, finding types or the JSON schema. Adds 9 tests (explicit
selection, missing-sheet errors, default compatibility, header auto-detect on a
selected sheet, CLI Markdown + JSON). Closes #4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@migmcc migmcc added this to the v0.2 milestone Jun 20, 2026
@migmcc migmcc marked this pull request as ready for review June 20, 2026 20:46
@migmcc migmcc merged commit 74ebbee into main Jun 21, 2026
4 checks passed
@migmcc migmcc deleted the feat/multi-sheet branch June 21, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multi-sheet workbooks

1 participant