diff --git a/src/main.py b/src/main.py index b14f270..e2916e5 100644 --- a/src/main.py +++ b/src/main.py @@ -75,7 +75,10 @@ def copy_excel_file(source_path, destination_path, passwords): # Create new sheet in destination workbook from openpyxl.chartsheet import Chartsheet if isinstance(source_sheet, Chartsheet): - chartsheet_warning = f"Chartsheet detected in '{os.path.basename(source_path)}' on sheet '{sheet_name}'." + original_filename = os.path.basename(source_path) + if '_processed' in original_filename: # If it's a temp file, get original name + original_filename = original_filename.split('_processed')[0] + chartsheet_warning = f"Chartsheet detected in '{original_filename}' on sheet '{sheet_name}'." # For chartsheets, we need to create a worksheet instead dest_sheet = dest_wb.create_sheet(title=sheet_name)