XLSX::SheetBuilder
Inherits Reference < Object
Builds a single Sheet by iterating a row span or appending rows.
Can be pre-populated from an existing Sheet to support template-based
building, where existing content is preserved and new rows are appended.
Constructors
from_sheet(sheet : Sheet) : self
Pre-populates this builder from an existing Sheet.
Existing rows are carried over and append_row will add after them.
new(name : String)
SourceInstance methods
append_row(values : Enumerable)
Appends a row of values after the last present row.
Accepts any Enumerable.
append_row(*values : CellValue)
Appends a row of values after the last present row.
Accepts a splat of CellValue items.
name
Sourcerows(span : Range(Int32, Int32), & : RowBuilder, Int32 -> )
Iterates span, yielding a RowBuilder and 1-based row ID for each row.
The built row is collected after each block call.
sheet.rows(3..10) do |row, row_id|
row.cells(2..5) { |col_id| value_for(row_id, col_id) }
row[1] = "Boo"
end