From 3aa468bc7aef709c89098fb88fdfc066945bf120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Thu, 6 Oct 2016 08:01:12 +0200 Subject: [PATCH] [FIX] mis_builder: crash in xslx with one column fixes #204 --- mis_builder/report/mis_report_instance_xlsx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mis_builder/report/mis_report_instance_xlsx.py b/mis_builder/report/mis_report_instance_xlsx.py index dce033a2..ecfa470b 100644 --- a/mis_builder/report/mis_report_instance_xlsx.py +++ b/mis_builder/report/mis_report_instance_xlsx.py @@ -131,9 +131,9 @@ class MisBuilderXlsx(ReportXlsx): # adjust col widths sheet.set_column(0, 0, min(label_col_width, MAX_COL_WIDTH) * COL_WIDTH) - data_col_width = min(MAX_COL_WIDTH, max(*col_width.values())) - min_col_pos = min(*col_width.keys()) - max_col_pos = max(*col_width.keys()) + data_col_width = min(MAX_COL_WIDTH, max(col_width.values())) + min_col_pos = min(col_width.keys()) + max_col_pos = max(col_width.keys()) sheet.set_column(min_col_pos, max_col_pos, data_col_width * COL_WIDTH)