Sha256: 73175f34441814f0ff0910ca638fe666204c45f0cce3de80f99c8cc3ec13c1cc

Contents?: true

Size: 835 Bytes

Versions: 42

Compression:

Stored size: 835 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'

class TestRegressionArrayFormula01 < Test::Unit::TestCase
  def setup
    setup_dir_var
  end

  def teardown
    File.delete(@xlsx) if File.exist?(@xlsx)
  end

  def test_array_formula01
    @xlsx = 'array_formula01.xlsx'
    workbook  = WriteXLSX.new(@xlsx)
    worksheet = workbook.add_worksheet

    data = [0, 0, 0]

    worksheet.write_col('B1', data)
    worksheet.write_col('C1', data)

    worksheet.write_array_formula('A1:A3', '{=SUM(B1:C1*B2:C2)}', nil, 0)

    workbook.close
    compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx,
                                [ 'xl/calcChain.xml', '[Content_Types].xml', 'xl/_rels/workbook.xml.rels' ],
                                {'xl/workbook.xml' => ['<workbookView']}
                                )
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
write_xlsx-0.54.0 test/regression/test_array_formula01.rb
write_xlsx-0.51.0 test/regression/test_array_formula01.rb