Description

class Axlsx::Col

The Col class defines column attributes for columns in sheets.

Create a new Col objects

Parameters:

  • min

    First column affected by this 'column info' record.

  • max

    Last column affected by this 'column info' record.

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

    a customizable set of options

Options Hash (options):

  • collapsed (Boolean)

    see Col#collapsed

  • hidden (Boolean)

    see Col#hidden

  • outlineLevel (Boolean)

    see Col#outlineLevel

  • phonetic (Boolean)

    see Col#phonetic

  • style (Integer)

    see Col#style

  • width (Numeric)

    see Col#width

Flag indicating if the specified column(s) is set to 'best fit'. 'Best fit' is set to true under these conditions: The column width has never been manually set by the user, AND The column width is not the default width 'Best fit' means that when numbers are typed into a cell contained in a 'best fit' column, the column width should

automatically resize to display the number. [Note: In best fit cases, column width must not be made smaller, only larger. end note]

Flag indicating if the outlining of the affected column(s) is in the collapsed state.

Flag indicating if the affected column(s) are hidden on this worksheet.

Last column affected by this 'column info' record.

First column affected by this 'column info' record.

Outline level of affected column(s). Range is 0 to 7.

Flag indicating if the phonetic information should be displayed by default for the affected column(s) of the worksheet.

Default style for the affected column(s). Affects cells not yet allocated in the column(s). In other words, this style applies to new columns.

Serialize this columns data to an xml string

Parameters:

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

updates the width for this col based on the cells autowidth and an optionally specified fixed width to this value and the cell's attributes are ignored. autowidth value will be ignored.

Parameters:

  • cell (Cell)

    The cell to use in updating this col's width

  • fixed_width (Integer) (defaults to: nil)

    If this is specified the width is set

  • use_autowidth (Boolean) (defaults to: true)

    If this is false, the cell's

The width of the column

Col is referenced in 0 repositories