Sha256: 81ec7f63443ed935c0aad29fcd7bd68562ffbd11b58a7e909d8e650ecddd5779

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

# Ultra Fast Excel Writter for Ruby

```ruby
workbook = FastExcel.open("hello_world_ffi.xlsx", constant_memory: true)
worksheet = workbook.add_worksheet("Garuda Payments")

bold = workbook.bold_cell_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)

for i in 1..1000
  worksheet.write_row(i, ["Hello", (rand * 10_000_000).round(2), Time.now])

  # 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
  # date[:year] = 2017
  # date[:month] = 2
  # date[:day] = 24
  # date[:hour] = i % 24
  # date[:min] = i % 60
  # date[:sec] = i % 60
  # worksheet.write_datetime(i, 2, date, nil)
end

workbook.close
```

This repositiry and gem contain precompiled [libxlsxwriter](https://github.com/jmcnamara/libxlsxwriter) for MacOs, Linux with glibc and Alpine Linux

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fast_excel-0.1.4 README.md
fast_excel-0.1.3 README.md
fast_excel-0.1.2 README.md