Fast and memory efficient XLSX reader on top of Ox SAX parser.
It reads row by row and doesn't store the whole sheet in memory, so this approach is more suitable when parsing big files. This also means that functions and references will not work, as this style of parsing doesn't know anything about other rows.
Add this line to your application's Gemfile:
gem 'saxlsx'
And then execute:
$ bundle
Or install it yourself as:
$ gem install saxlsx
Saxlsx::Workbook.open filename do |w|
w.sheets.each do |s|
s.rows.each do |r|
puts r.inspect
end
end
end
$ rake bench
creek 2.610000 0.060000 2.670000 ( 2.704594)
rubyXL 3.830000 0.130000 3.960000 ( 3.985651)
saxlsx 0.750000 0.010000 0.760000 ( 0.785445)
simple_xlsx_reader 1.870000 0.040000 1.910000 ( 1.940999)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request