Skip to content

Commit

Permalink
Simplify lazy loader
Browse files Browse the repository at this point in the history
Signed-off-by: Bram Stoeller <[email protected]>
  • Loading branch information
bramstoeller committed Mar 2, 2023
1 parent e926849 commit dbce5e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power_grid_model_io/data_stores/excel_file_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def sheet_loader():
excel_file = pd.ExcelFile(path)
for sheet_name in excel_file.sheet_names:
loader = lazy_sheet_loader(excel_file, sheet_name)
if name:
if name != "": # If the Excel file is not the main file, prefix the sheet name with the file name
sheet_name = f"{name}.{sheet_name}"
if sheet_name in data:
raise ValueError(f"Duplicate sheet name '{sheet_name}'")
Expand Down

0 comments on commit dbce5e0

Please sign in to comment.