diff --git a/work_helpers/excel2changelog.py b/work_helpers/excel2changelog.py index ffe27f2..92fc86b 100644 --- a/work_helpers/excel2changelog.py +++ b/work_helpers/excel2changelog.py @@ -13,6 +13,12 @@ sheet = "Input_Data_*" col_start = "A" row_start = 8 +def xls_formula_spacing(formula): + for c in "();=": + formula = formula.replace(c, f"{c} ") + return formula + + def text_to_changelog( raw_text, sheet, start_column, start_row, compact=False, keep=False @@ -35,6 +41,8 @@ def text_to_changelog( cell = cell.strip() if not (cell or keep): continue + if compact: + cell = xls_formula_spacing(cell) output.append(f"{sheet}{xls_sep}{column}{row}\t{cell}") iterator = iter(output)