Description

class Axlsx::CellAlignment
Note:

Using Styles#add_style is the recommended way to manage cell alignment.

CellAlignment stores information about the cell alignment of a style Xf Object.

Create a new cell_alignment object

Parameters:

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

    a customizable set of options

Options Hash (options):

  • horizontal (Symbol)
  • vertical (Symbol)
  • text_rotation (Integer)
  • wrap_text (Boolean)
  • indent (Integer)
  • relative_indent (Integer)
  • justify_last_line (Boolean)
  • shrink_to_fit (Boolean)
  • reading_order (Integer)
Note:

The horizontal cell alignement style must be one of

:general
:left
:center
:right
:fill
:justify
:centerContinuous
:distributed

The horizontal alignment of the cell.

The amount of indent

Indicate if the last line should be justified.

The reading order of the text 0 Context Dependent 1 Left-to-Right 2 Right-to-Left

The amount of relativeIndent

Indicate if the text should be shrunk to the fit in the cell.

The textRotation of the cell.

Serializes the object

Parameters:

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

The vertical cell allingment style must be one of the following:

:top
:center
:bottom
:justify
:distributed

The vertical alignment of the cell.

Indicate if the text of the cell should wrap

CellAlignment is referenced in 0 repositories