From c47e49baaf3310e79de1fe37c8da9dc3c85b262d Mon Sep 17 00:00:00 2001 From: fengbohan <1953356163@qq.com> Date: Sun, 28 Apr 2024 09:07:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=94=9F=E6=88=90=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E6=AF=8F=E4=B8=AA=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=86=85=E9=83=BD=E6=8F=92=E5=85=A5=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gen_word.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gen_word.py b/gen_word.py index 7a8cafc..d173dc2 100644 --- a/gen_word.py +++ b/gen_word.py @@ -90,20 +90,32 @@ class WEEK_REPORT: # 删除上周工作内容 for i in range(7,12): - table.Cell(Row=i, Column=2).Range.Text = '' - table.Cell(Row=i, Column=3).Range.Text = '' + table.Cell(Row=i, Column=2).Range.Text = "\n".join(["{}:".format(i) for i in self.project_name]) + table.Cell(Row=i, Column=3).Range.Text = "\n".join(["{}:".format(i) for i in self.project_name]) + table.Cell(Row=i, Column=2).Range.Font.Bold = True + table.Cell(Row=i, Column=3).Range.Font.Bold = True + table.Cell(Row=i, Column=2).Range.Font.Name = "Times New Roman" + table.Cell(Row=i, Column=3).Range.Font.Name = "Times New Roman" + table.Cell(Row=i, Column=2).Range.Text = table.Cell(Row=i, Column=2).Range.Text.upper() + table.Cell(Row=i, Column=3).Range.Text = table.Cell(Row=i, Column=3).Range.Text.upper() # 额外工作记录 table.Cell(Row=13, Column=1).Range.Text = '' # 工作完成情况 - table.Cell(Row=15, Column=1).Range.Text = "\n".join(["{}(?%)".format(i) for i in self.project_name]) + table.Cell(Row=15, Column=1).Range.Text = "\n".join(["{}(xx%)".format(i) for i in self.project_name]) + table.Cell(Row=15, Column=1).Range.Font.Bold = True + table.Cell(Row=15, Column=1).Range.Font.Name = "Times New Roman" + table.Cell(Row=15, Column=1).Range.Text = table.Cell(Row=15, Column=1).Range.Text.upper() # 困难问题、经验教训及建议 table.Cell(Row=17, Column=1).Range.Text = '' # 下周工作重点 - table.Cell(Row=19, Column=1).Range.Text = '' + table.Cell(Row=19, Column=1).Range.Text = "\n".join(["{}:".format(i) for i in self.project_name]) + table.Cell(Row=19, Column=1).Range.Font.Bold = True + table.Cell(Row=19, Column=1).Range.Font.Name = "Times New Roman" + table.Cell(Row=19, Column=1).Range.Text = table.Cell(Row=19, Column=1).Range.Text.upper() def close_file(self): logger.info("process: copy file ...")