diagnose_workbook
Check if an Excel workbook is safe for file-based editing by scanning hazards like slicers, VBA, and Power Query, and get routing recommendations for surgical or structural edits.
Instructions
The round-trip hazard scan surfaced as a health readout: which fragile parts the workbook holds (slicers, shapes, embedded objects, Power Query, VBA, and the rest), whether a file-based openpyxl edit would drop any of them, the routing recommendation for a surgical versus a structural edit, and a light integrity summary (sheet counts, formula-cell count, keep_vba). This is how you check a workbook is safe to edit before mutating it.
What to do with the verdict: hazards never block reads; a would-lose verdict means every mutating tool will refuse unless you route through Excel (com pack) or pass allow_loss:true (an explicit, backed-up acceptance of the loss). A clean verdict means file-based edits are round-trip safe. Content with no part of its own is covered too: the scan reads each worksheet's extLst, so x14 conditional formats (data bars, icon sets), sparkline groups and slicer lists come back as a would-lose verdict like any other drop-risk hazard. Limit: the extLst walk looks at the worksheet's top level, and an extension openpyxl drops from anywhere else is caught at save time by openpyxl's own load warning rather than here. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||