Read more

xlsxtream: Streaming & Fast XLSX Spreadsheet Writer for Ruby

Arne Hartherz
November 03, 2017Software engineer at makandra GmbH

When writing XLSX files, there are gems like rubyXL Show archive.org snapshot or axlsx Show archive.org snapshot . While they do offer features like formatting or graphs, to represent spreadsheet cells, they have to keep several Ruby objects in memory. When writing huge files, both will become slow and consume lots of memory.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Enter Xlsxtream Show archive.org snapshot , a Ruby XLSX library with less features (e.g. no individual cell styles) but which does away with the memory issue by streaming rows directly to disk (or an IO stream).

It is incredibly fast, even for large spreadsheets. And as long as you don't prepare all data beforehand, it requires little memory.

Xlsxtream will correctly handle Numerics, Dates, Times, and Booleans. Support for Shared String Tables (useful for huge spreadsheets with repetitive data) is also included.

Posted by Arne Hartherz to makandra dev (2017-11-03 18:07)