From 698c87636767a02309b795416ac339e58aefa679 Mon Sep 17 00:00:00 2001 From: alexvalentine94 Date: Thu, 14 Mar 2024 19:20:22 +0000 Subject: [PATCH] closes #231; processing of sphere restored --- jade/excelsupport.py | 50 ++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/jade/excelsupport.py b/jade/excelsupport.py index e16f2f90..f0c17a1f 100644 --- a/jade/excelsupport.py +++ b/jade/excelsupport.py @@ -1213,14 +1213,14 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): # out of bounds formatting val_sheet.set_column(0, 0, 4, oob_format) - val_sheet.set_column(values_width + 2, 1000, 18, oob_format) + val_sheet.set_column(values_width, 1000, 18, oob_format) for i in range(9): val_sheet.set_row(i, None, oob_format) for i in range(9 + values_len, 1000): val_sheet.set_row(i, None, oob_format) # Column widths - val_sheet.set_column(1, values_width + 2, 20) + val_sheet.set_column(1, values_width, 20) # Row Heights val_sheet.set_row(7, 31) @@ -1242,14 +1242,14 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, {"type": "blanks", "format": plain_format}, ) val_sheet.conditional_format( 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "text", "criteria": "containing", @@ -1261,7 +1261,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "text", "criteria": "containing", @@ -1273,7 +1273,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "text", "criteria": "containing", @@ -1285,7 +1285,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "greater than", @@ -1297,7 +1297,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "between", @@ -1310,7 +1310,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "between", @@ -1323,7 +1323,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "less than", @@ -1335,7 +1335,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "between", @@ -1348,7 +1348,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "between", @@ -1361,7 +1361,7 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): 9, 3, 8 + values_len, - values_width + 1, + values_width, { "type": "cell", "criteria": "between", @@ -1370,6 +1370,30 @@ def sphere_single_excel_writer(self, outpath, lib, values, errors, stats=None): "format": green_cell_format, }, ) + val_sheet.conditional_format( + 9, + values_width - 2, + 8 + values_len, + values_width - 1, + { + "type": "cell", + "criteria": ">=", + "value": 0, + "format": percent_format, + }, + ) + val_sheet.conditional_format( + 9, + values_width - 2, + 8 + values_len, + values_width - 1, + { + "type": "cell", + "criteria": "<", + "value": 0, + "format": percent_format, + }, + ) # ERRORS