From 180ff5030d576560ad16366d47c5e7d87386e83f Mon Sep 17 00:00:00 2001 From: Nixevol Date: Fri, 13 Nov 2026 15:45:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A9=E9=87=87=E6=A0=B7=E7=82=B9?= =?UTF-8?q?=E5=8D=A0=E6=AF=94=E6=95=B4=E5=88=97=E6=98=BE=E7=A4=BA=E4=B8=BA?= =?UTF-8?q?=E7=99=BE=E5=88=86=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AoiSample.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/AoiSample.py b/Scripts/AoiSample.py index 3f758a3..05553b4 100644 --- a/Scripts/AoiSample.py +++ b/Scripts/AoiSample.py @@ -384,8 +384,9 @@ def write_book(path, frames): sheet = writer.sheets[name] percent = [index for index, column in enumerate(frame.columns, 1) if str(column).endswith("移动采样点占比")] for column in percent: - for cell in sheet.iter_cols(min_col=column, max_col=column, min_row=2, max_row=sheet.max_row): - cell[0].number_format = "0.00%" + for cells in sheet.iter_cols(min_col=column, max_col=column, min_row=2, max_row=sheet.max_row): + for cell in cells: + cell.number_format = "0.00%" for cell in sheet[1]: sheet.column_dimensions[cell.column_letter].width = max(12, len(str(cell.value)) * 2 + 2) sheet.freeze_panes = "C2"