문제

When I open a Shared Workbook with Multiple Edit enabled, I loose the settings while saving the file using xlwt. Here is the code which I am trying, but this do not save the shared workbook properties/settings while saving back as xls. Is there any simple way I can do this?

def writePowerOnTimeExcel(nrow):
    from xlrd import open_workbook
    from xlwt import easyxf
    from xlutils.copy import copy
    rb = open_workbook('.\\LabInventory.xls',formatting_info=True)
    rs = rb.sheet_by_index(0)
    wb = copy(rb)
    ws = wb.get_sheet(0)
    text=str('here i am in')
    ws.write(nrow+1,3,label=text)
    wb.save(".\\LabInventory.xls")
writePowerOnTimeExcel(i)
도움이 되었습니까?

해결책

It is not possible. xlrd does not read those property settings. xlwt does not write them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top