You shouldn’t try and access worksheets by index. The error is because the
second worksheet hasn’t been created (every workbook has a single worksheet
created automatically).
ws1 = wb.activews2 = wb.create_sheet()
Should solve your problem.

You shouldn’t try and access worksheets by index. The error is because the
second worksheet hasn’t been created (every workbook has a single worksheet
created automatically).
ws1 = wb.activews2 = wb.create_sheet()
Should solve your problem.