It seems I can’t have a tabColor with a protection…
Un-commenting the lines linked to protection unsets the tab color.
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
for _r_ in range(1,4):
ws.cell(row=_r_, column=1, value=_r_)
ws_prop = ws.sheet_properties
ws_prop.tabColor = "FF7400"
#ws.protection.sheet = True
#ws.protection.set_password("aze", already_hashed=False)
#wb.security.set_workbook_password("aze", already_hashed=False)
#wb.security.lockStructure = True
wb.save("output_formatted.xlsx")
Any help appreciated.