Sha256: eb380e5e32599c68e9cafcfeca945e1d2718cba3b719ca349f3ed4eb3c689f17
Contents?: true
Size: 550 Bytes
Versions: 4
Compression:
Stored size: 550 Bytes
Contents
require_relative '../lib/fast_excel' workbook = FastExcel.open("example_formula.xlsx", constant_memory: false) worksheet = workbook.add_worksheet worksheet.write_row(0, ["Item", "Weight"]) worksheet.write_row(1, ["Laptop", 1.37]) worksheet.write_row(2, ["Phone", 0.138]) worksheet.write_row(3, ["Mouse", 0.099]) worksheet.write_row(4, ["Speaker", 2.5]) worksheet.write_row(5, ["Camera", 0.383]) worksheet.write_row(6, ["Total", FastExcel::Formula.new("SUM(B2:B6)")], workbook.bold_format) workbook.close puts "Saved to file example_formula.xlsx"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fast_excel-0.5.0 | examples/example_formula.rb |
fast_excel-0.4.1 | examples/example_formula.rb |
fast_excel-0.4.0 | examples/example_formula.rb |
fast_excel-0.3.0 | examples/example_formula.rb |