Hello, I loaded an existing workbook, wanted to change names of the sheets that have been there and create new ones and save them in a new excel file. So, I was able to create two sheets but their are not in the order I thought they would be. Also, for some reason I could only change a name of one excising worksheet but not the two others. What I might be doing incorrectly? Thank you.
from openpyxl import load_workbook wb = load_workbook('test01.xlsx') ws1 = wb.create_sheet('Coloring and heading') ws2 = wb.create_sheet('test11') ws3 = wb.active ws3.title = "test33" ws4 = wb.active ws4.title = "test22" ws5 = wb.active ws5.title = "Initial info" wb.save('test02.xlsx')