I am generating .xlsx
files using axlsx_rails
gem based on axlsx
. I am receiving rows as array and drawing them like this:
# Workbook, sheet and styles creations left...
data["config"].each do |item|
sheet.add_row item.each_with_index.map{|row, index| row["value"]}, :style => row_style
end
Then I need to insert a new row between for example 2nd and 3rd rows. I wonder how I can achieve this?