Sha256: 8c33bbba225eef5cbb3a0f50b4302f91b1ba9439b65693649bcd18e76b63f878

Contents?: true

Size: 375 Bytes

Versions: 21

Compression:

Stored size: 375 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'writeexcel'

# Create a new workbook called simple.xls and add a worksheet
workbook  = WriteExcel.new('store_formula.xls')
worksheet = workbook.add_worksheet()

formula = worksheet.store_formula('=A1 * 3 + 50')
(0 .. 999).each do |row|
  worksheet.repeat_formula(row, 1, formula, nil, 'A1', "A#{row + 1}")
end

workbook.close

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
writeexcel-1.0.4 examples/store_formula.rb
writeexcel-1.0.3 examples/store_formula.rb
writeexcel-1.0.2 examples/store_formula.rb
writeexcel-1.0.1 examples/store_formula.rb
writeexcel-1.0.0 examples/store_formula.rb
writeexcel-0.6.19 examples/store_formula.rb
writeexcel-0.6.18 examples/store_formula.rb
writeexcel-0.6.17 examples/store_formula.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.16/examples/store_formula.rb
writeexcel-0.6.16 examples/store_formula.rb
writeexcel-0.6.15 examples/store_formula.rb
writeexcel-0.6.14 examples/store_formula.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/store_formula.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/store_formula.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/store_formula.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/store_formula.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/writeexcel-0.6.13/examples/store_formula.rb
writeexcel-0.6.13 examples/store_formula.rb
ricardoo27-writeexcel-0.6.12.2 examples/store_formula.rb
ricardoo27-writeexcel-0.6.12.1 examples/store_formula.rb