lib/write_xlsx/package/table.rb in write_xlsx-0.97.0 vs lib/write_xlsx/package/table.rb in write_xlsx-0.99.0
- old
+ new
@@ -238,9 +238,14 @@
#
# Convert a table total function to a worksheet formula.
#
def table_function_to_formula(function, col_name)
+ col_name = col_name.gsub(/'/, "''").
+ gsub(/#/, "'#").
+ gsub(/\[/, "'[").
+ gsub(/\]/, "']")
+
subtotals = {
:average => 101,
:countNums => 102,
:count => 103,
:max => 104,