Python xlwt - making a column readonly (cell protect)
问题 Is there a way to make a particular cell read-only/write protected in python xlwt? I know there's is a cell_overwrite_ok flag which does not allow to overwrite contents of cells (all cells) but can this be done on cell by cell basis. Thanks, Sun 回答1: Excel cells have a locked attribute that is enabled by default. However, this attribute is only invoked when the worksheet's protection attribute is also set to True . If the worksheet is not protected, the locked attribute is ignored. Therefore,