Class Spreadsheet::Row
In: lib/spreadsheet/row.rb
Parent: Array

The Row class. Encapsulates Cell data and formatting. Since Row is a subclass of Array, you may use all the standard Array methods to manipulate a Row. By convention, Row#at will give you raw values, while Row#[] may be overridden to return enriched data if necessary (see also the Date- and DateTime-handling in Excel::Row#[]

Useful Attributes are:

idx:The 0-based index of this Row in its Worksheet.
formats:A parallel array containing Formatting information for all cells stored in a Row.
default_format:The default Format used when writing a Cell if no explicit Format is stored in formats for the cell.
height:The height of this Row in points (defaults to 12).

Methods

Included Modules

Datatypes

Attributes

default_format  [R] 
formats  [R] 
height  [RW] 
idx  [RW] 
worksheet  [RW] 

Public Class methods

Public Instance methods

The default Format of this Row, if you have set one. Returns the Worksheet‘s default or the Workbook‘s default Format otherwise.

Set the default Format used when writing a Cell if no explicit Format is stored for the cell.

first_unused()

Alias for formatted_size

first_used the 0-based index of the first non-blank Cell.

The Format for the Cell at idx (0-based), or the first valid Format in Row#default_format, Column#default_format and Worksheet#default_format.

Returns a copy of self with nil-values appended for empty cells that have an associated Format. This is primarily a helper-function for the writer classes.

Same as Row#size, but takes into account formatted empty cells

Set the Format for the Cell at idx (0-based).

[Validate]