module Xlsxrb::Elements
High-level domain model layer. Provides immutable Data classes representing Excel concepts.
Constants
- CellError
- Column
-
Represents column formatting in a worksheet. index is 0-based.
@example
col = Elements::Column.new(index: 0, width: 25.0)
@api public
- EMPTY_CELLS
- EMPTY_ERRORS
- EMPTY_HASH
- Formula
-
Represents an Excel formula with an optional cached value and calculation properties.
@example Create a formula
formula = Elements::Formula.new(expression: "SUM(A1:A10)")
@api public
- RichText
-
Represents a rich text string with multiple formatting runs.
@example
rt = Elements::RichText.new(runs: [{ text: "Hello ", font: { bold: true } }, { text: "World" }])
@api public
- Row
-
Represents a single row in a worksheet. All row and column indices are 0-based.
@example Access cell by index or symbol
row = sheet.row_at(0) cell = row[0] # cell at column 0 row.to_a # array of cell values
@api public
- VALID_ERROR_CODES
-
Represents a cell error value (e.g. #N/A, #REF!, #DIV/0!). @api public
- Workbook
-
Represents an entire in-memory XLSX workbook.
@example Access sheets
workbook = Xlsxrb.read("report.xlsx") sheet = workbook.sheet(0) # or workbook["Sheet1"] workbook.each { |s| puts s.name }
@api public