I am a newbie to openpyxl and have a cockpit issue. Below is a code snippet # Get active worksheet, last sheet last_sheet_index = len(wb.sheetnames) - 1 wb.active = last_sheet_i