examples/example.rb in fast_excel-0.2.6 vs examples/example.rb in fast_excel-0.3.0

- old
+ new

@@ -9,22 +9,22 @@ # pp workbook.default_format worksheet = workbook.add_worksheet("Payments Report") -bold = workbook.bold_cell_format +bold = workbook.bold_format worksheet.set_column(0, 0, FastExcel::DEF_COL_WIDTH, bold) price = workbook.number_format("#,##0.00") worksheet.set_column(1, 1, 20, price) date_format = workbook.number_format("[$-409]m/d/yy h:mm AM/PM;@") worksheet.set_column(2, 2, 20, date_format) -worksheet.write_row(0, ["message", "price", "date"], bold) +worksheet.write_row(0, ["message", "price", "date", "complete"], bold) for i in 1..1000 - worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now]) + worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now, i % 2 == 0]) # Or manually # worksheet.write_string(i, 0, "Hello", nil) # worksheet.write_number(i, 1, (rand * 10_000_000).round(2), nil) # date = Libxlsxwriter::Datetime.new \ No newline at end of file