Reputation: 41
Here in below example, I want to add each array elements as separate column value between 'value1' & 'value2'. Anyone have an idea about it?
wb = xlsx_package.workbook
wb.styles do |style|
wb.add_worksheet(name: "Result") do |sheet|
sheet.add_row ['Value1', 'Value2']
end
end
Upvotes: 1
Views: 1169
Reputation: 381
Use add_cell
add_cell(value = '', options = {}) ⇒ Cell This adds a single cell to the row based on the data provided and updates the worksheet's autofit data.
http://www.rubydoc.info/github/randym/axlsx/Axlsx/Row
Upvotes: 2