From 1413f9be2cef8e0cc77113b94d1d0e4a7afc8ed6 Mon Sep 17 00:00:00 2001 From: Paul Kmiec Date: Tue, 2 May 2023 02:02:16 -0700 Subject: Treat escape_formulas similar to type, style, formula_value This avoid parse_options doing anything which can be expensive if it happens for each cell. --- lib/axlsx/workbook/worksheet/cell.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index 929a7c28..74ca7360 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -45,9 +45,10 @@ module Axlsx self.style = val unless val.nil? || val == 0 val = options.delete(:formula_value) self.formula_value = val unless val.nil? + val = options.delete(:escape_formulas) + self.escape_formulas = val.nil? ? row.worksheet.escape_formulas : val parse_options(options) - self.escape_formulas = row.worksheet.escape_formulas if escape_formulas.nil? self.value = value value.cell = self if contains_rich_text? -- cgit v1.2.3