Description

class Axlsx::Row
Note:

The recommended way to manage rows and cells is to use Worksheet#add_row

A Row is a single row in a worksheet.

A new cell is created for each item in the values array. style and types options are applied as follows:

If the types option is defined and is a symbol it is applied to all the cells created.
If the types option is an array, cell types are applied by index for each cell
If the types option is not set, the cell will automatically determine its type.
If the style option is defined and is an Integer, it is applied to all cells created.
If the style option is an array, style is applied by index for each cell.
If the style option is not defined, the default style (0) is applied to each cell.

Parameters:

  • worksheet (Worksheet)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • values (Array)
  • types (Array, Symbol)
  • style (Array, Integer)
  • height (Float)

    the row's height (in points)

Adds a single cell to the row based on the data provided and updates the worksheet's autofit data.

Converts values, types, and style options into cells and associates them with this row. A new cell is created for each item in the values array. If value option is defined and is a symbol it is applied to all the cells created. If the value option is an array, cell types are applied by index for each cell If the style option is defined and is an Integer, it is applied to all cells created. If the style option is an array, style is applied by index for each cell.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • values (Array)
  • types (Array, Symbol)
  • style (Array, Integer)

return cells

Row height measured in point size. There is no margin padding on row height.

Outlining level of the row, when outlining is on

The index of this row in the worksheet

The style applied ot the row. This affects the entire row.

sets the style for every cell in this row

Serializes the row

Parameters:

  • r_index (Integer)

    The row index, 0 based.

  • str (String) (defaults to: '')

    The string this rows xml will be appended to.

The worksheet this row belongs to

Row is referenced in 0 repositories