ws1.protect = True ws1.wnd_protect = True ws1.obj_protect = True ws1.scen_protect = True ws1.password = "******" ws2.protect = True ws2.wnd_protect = True ws2.obj_protect = True ws2.scen_protect = True ws2.password = "******" wb.protect = True wb.wnd_protect = True wb.obj_protect = True wb.save('.//xlwt_official_exmple//protection.xls') from xlwt import Workbook from xlwt.BIFFRecords import PanesRecord w = Workbook() # do each of the 4 scenarios with each of the 4 possible # active pane settings for px,py in ( (0,0), # no split (0,10), # horizontal split (10,0), # vertical split (10,10), # both split ):