def _update_excel(self,parent_path):
'''??????????'''
rb=xlrd.open_workbook(parent_path+"/test.xls",formatting_info=True)
wb =copy(rb)
summary = wb.get_sheet(11)#???
basemessage=wb.get_sheet(1)#????
protection=xlwt.Protection()
protection.cell_locked=0
cellStyle1=xlwt.easyxf("protection:cell_locked false;")
cellStyle2=xlwt.XFStyle()
librarylogger.info(u"?????????????")
try:
summary.write(2, 2, u'?????????'+self._rnumber+u'?')
librarylogger.info(u"?????????????")
basemessage.write(7,1,self._rnumber,cellStyle1)
librarylogger.info(u"???????????????")
except Exception, e:
print traceback.format_exc()
librarylogger.info(u"?????????????")
wb.save(parent_path+"/test.xls")
OnlineReport.py 文件源码
python
阅读 18
收藏 0
点赞 0
评论 0
评论列表
文章目录