1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
## Description
You could escape formulas
## Code
```ruby
require 'axlsx'
p = Axlsx::Package.new
wb = p.workbook
wb.add_worksheet(name: 'Escaping Formulas') do |sheet|
sheet.add_row [1, 2, 3, '=SUM(A2:C2)'], escape_formulas: true
sheet.add_row [
'=IF(2+2=4,4,5)',
'=IF(13+13=4,4,5)',
'=IF(99+99=4,4,5)'
], escape_formulas: [true, false, true]
end
p.serialize 'escape_formula_example.xlsx'
```
## Output

|