require 'rubygems' require 'roo' require 'benchmark' def process_all_cells(oo) oo.default_sheet = oo.sheets.first #oo.first_row.upto(oo.last_row) do |row| # oo.first_column.upto(oo.last_column) do |col| # result = oo.cell(row,col) # end #end ret = [] oo.first_row.upto(oo.last_row) do |row| ret << oo.row(row) end end # 3735 Zeilen jeweils def openoffice oo = Openoffice.new('Bibelbund.ods') process_all_cells(oo) end def excel oo = Excel.new('Bibelbund.xls') process_all_cells(oo) end def excelx oo = Excelx.new('Bibelbund.xlsx') process_all_cells(oo) end n = 1 Benchmark.bmbm(10) do |x| x.report('openoffice:') { n.times do openoffice end } x.report('excel:') { n.times do excel end } x.report('excelx:') { n.times do excelx end } end