I am using Axlsx to create an excel file. For a small dataset, it works fine. But once the dataset gets big, it just hangs. I ran strace on the process, it was doing a lot brk.
a = Axlsx::Package.new
book = a.workbook
book.add_worksheet(:name => "test") do |sheet|
input_array.each do |input_data|
...# covert input_data to row_data
sheet.add_row(row_data)
end
end
File.open("testfile", 'w') { |f| f.write(p.to_stream().read) }
My input_array size is about 400,000, so the worksheet has 400,000 rows, quite large. It got stuck at p.to_stream().read
. Any help would be great. Thanks.