我正在.xlsx
使用axlsx_rails
基于axlsx
. 我将行作为数组接收并像这样绘制它们:
# 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
然后我需要在例如第 2 行和第 3 行之间插入一个新行。我想知道我怎么能做到这一点?