class

XLSX::Row

Inherits Reference < Object

A single row of cells from a worksheet.

Cells are stored sparsely: only cells present in the XML exist here. Column IDs are 1-based, matching Excel's column numbering (A=1, B=2, …).

attrs preserves all <row> element attributes except r, allowing formatting metadata (style, height, outline level, etc.) to round-trip through a template build unchanged.

Constructors

new(row_id : Int32, cells : Hash(Int32, Cell), attrs : Hash(String, String) = {} of String => String)
Source

Instance methods

[](col_id : Int32) : CellValue

Returns the cell value at col_id, or nil if the cell is absent.

Source
attrs
Source
cell(col_id : Int32) : Cell | Nil

Returns the full Cell at col_id, or nil if absent.

Source
col_span

Returns the range from the first to last present column ID. Raises Enumerable::EmptyError if the row has no cells.

Source
each_cell

Yields each present cell and its 1-based column ID, in column order. Absent columns are skipped.

Source
each_cell_full

Yields each present Cell and its 1-based column ID, in column order.

Source
empty?
Source
row_id
Source
size

Returns the number of present cells.

Source