UPDATE: chang number format to 1 decimal place
This commit is contained in:
parent
a7b86730aa
commit
1e49e14e4c
@ -524,8 +524,10 @@ def dict2xlsx(input: json, _type='report'):
|
||||
ws[key + str(start_index)].style = normal_cell
|
||||
elif _type == 'report_detail':
|
||||
if 'accuracy' in mapping[key] and type(value) in [int, float] and value < 75:
|
||||
ws[key + str(start_index)].number_format = '0.0'
|
||||
ws[key + str(start_index)].style = normal_cell_red
|
||||
elif 'speed' in mapping[key] and type(value) in [int, float] and value > 2.0:
|
||||
ws[key + str(start_index)].number_format = '0.0'
|
||||
ws[key + str(start_index)].style = normal_cell_red
|
||||
else:
|
||||
ws[key + str(start_index)].style = normal_cell
|
||||
|
Loading…
Reference in New Issue
Block a user