I used the spreadsheet gem to do this. It works but it can be very slow at times .I even tried the Roo gem, but that didn't improve the performance. Is there a better way to do this job? The weird thing is that some worksheets in the same excel work faster and some worksheets work very slowly, even taking up to 1 hour.
Can we use open office to open each worksheet(tab) in a single excel and convert them to csv much faster? If yes, how would I do it in ruby?
Or is there an even better solution?
Just adding a small example I tried with Roo gem
xls = Roo::Excel.new(source_excel_file)
xls.each_with_pagename do |name, sheet|
# p sheet.to_csv(File.join(dest_csv_dir,name + ".csv"))
#sheet.parse(:clean => true)#.to_csv(File.join(dest_csv_dir,name + ".csv"))
puts name
puts sheet.parse(:clean => true)
end