This commit is contained in:
David Rice
2026-04-13 14:40:21 +01:00
parent 95b700d6eb
commit cfb9e256b9

View File

@@ -328,7 +328,7 @@ def load_bom_data(bom_path: str) -> list | None:
Returns None if no 'bom' tab is found.""" Returns None if no 'bom' tab is found."""
wb = openpyxl.load_workbook(bom_path, data_only=True) wb = openpyxl.load_workbook(bom_path, data_only=True)
bom_sheet = next((wb[n] for n in wb.sheetnames if n.lower() == "bom"), None) bom_sheet = next((wb[n] for n in wb.sheetnames if n.strip().lower() == "bom"), None)
if bom_sheet is None: if bom_sheet is None:
return None return None