Sha256: 0f6b020c065bd99ff778c822a4877a553892b1b0cda0709d32c1fb7114baba6b

Contents?: true

Size: 877 Bytes

Versions: 6

Compression:

Stored size: 877 Bytes

Contents

require_relative './xlsx-func-testcase'

class TestArrayFormula < XlsxWriterTestCase
  def setup
    omit 'runs wrong test in libxlsxwriter'
  end

  test 'array_formula01' do |wb|
    ws = wb.add_worksheet nil
    ws.write_number(0, 1, 0, nil)
    ws.write_number(1, 1, 0, nil)
    ws.write_number(2, 1, 0, nil)
    ws.write_number(0, 2, 0, nil)
    ws.write_number(1, 2, 0, nil)
    ws.write_number(2, 2, 0, nil)

    ws.write_array_formula(0, 0, 2, 0, '{=SUM(B1:C1*B2:C2)}', nil)
  end

  test 'array_formula02' do |wb|
    ws = wb.add_worksheet
    wb.add_format(:bold, bold: true)

    ws.write_number(0, 1, 0, nil);
    ws.write_number(1, 1, 0, nil);
    ws.write_number(2, 1, 0, nil);
    ws.write_number(0, 2, 0, nil);
    ws.write_number(1, 2, 0, nil);
    ws.write_number(2, 2, 0, nil);

    ws.write_array_formula(0, 0, 2, 0, '{=SUM(B1:C1*B2:C2)}', :bold)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xlsxwriter-0.0.6 test/test-array-formula.rb
xlsxwriter-0.0.5 test/test-array-formula.rb
xlsxwriter-0.0.4 test/test-array-formula.rb
xlsxwriter-0.0.4.pre.2 test/test-array-formula.rb
xlsxwriter-0.0.3 test/test-array-formula.rb
xlsxwriter-0.0.2 test/test-array-formula.rb