From c32b2a1b06ddd5e137405b2d5c9a7f049a0747e3 Mon Sep 17 00:00:00 2001 From: John McNamara Date: Mon, 9 Oct 2023 17:35:53 +0100 Subject: [PATCH] table: fix escaping of future funtions Issue #1015 --- xlsxwriter/worksheet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xlsxwriter/worksheet.py b/xlsxwriter/worksheet.py index f5e9cedbf..4ee49a53a 100644 --- a/xlsxwriter/worksheet.py +++ b/xlsxwriter/worksheet.py @@ -3403,6 +3403,9 @@ def add_table(self, first_row, first_col, last_row, last_col, options=None): # Convert Excel 2010 "@" ref to 2007 "#This Row". formula = formula.replace("@", "[#This Row],") + # Escape any future functions. + formula = self._prepare_formula(formula) + col_data["formula"] = formula # We write the formulas below after the table data.