diff options
| author | tafryn <[email protected]> | 2014-03-04 08:33:09 -0800 |
|---|---|---|
| committer | tafryn <[email protected]> | 2014-03-04 08:33:09 -0800 |
| commit | 277f491501084673da580ce750712ed5fb81970a (patch) | |
| tree | 70a4344b4d4bd02f664c107922a55d986dbfd45d | |
| parent | 87cd49d0b8ab08c251368e89cdd9cb1f1eedbd4e (diff) | |
| download | caxlsx-277f491501084673da580ce750712ed5fb81970a.tar.gz caxlsx-277f491501084673da580ce750712ed5fb81970a.zip | |
Array forumla tests.
| -rw-r--r-- | test/workbook/worksheet/tc_cell.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb index ec39bba0..f07cdd58 100644 --- a/test/workbook/worksheet/tc_cell.rb +++ b/test/workbook/worksheet/tc_cell.rb @@ -287,6 +287,18 @@ class TestCell < Test::Unit::TestCase end + def test_to_xml_string_array_formula + p = Axlsx::Package.new + ws = p.workbook.add_worksheet do |sheet| + sheet.add_row ["{=SUM(C2:C11*D2:D11)}"] + end + doc = Nokogiri::XML(ws.to_xml_string) + doc.remove_namespaces! + assert(doc.xpath("//f[text()='SUM(C2:C11*D2:D11)']")) + assert(doc.xpath("//f[@t='array']")) + assert(doc.xpath("//f[@ref='A1']")) + end + def test_font_size_with_custom_style_and_no_sz @c.style = @c.row.worksheet.workbook.styles.add_style :bg_color => 'FF00FF' sz = @c.send(:font_size) |
