Using openpyxl, I loaded an existing workbook, and set a new active sheet.
Then when opening the workbook in Excel i noticed that the new active sheet got grouped with the original one prior to changing with openpyxl.
Is there any way to ungroup the sheets or any explanation for this behavior?
wb = openpyxl.load_workbook("test.xlsx")
wb.active = 3
wb.save("test.xlsx")
And after running here are the "grouped" sheets i'm talking about: Grouped Sheets Image
It's as if the active sheet i set in the code ("Four") doesn't fully change the selected sheet but selects the new sheet alongside the originally selected sheet ("One")
Another discussion of the problem: https://bitbucket.org/openpyxl/openpyxl/issues/878/index-0-worksheet-creation-in-existing
Thanks!