class Axlsx::CellStyle

CellStyle defines named styles that reference defined formatting records and can be used in your worksheet. @note Using Styles#add_style is the recommended way to manage cell styling. @see Styles#add_style

Attributes

builtinId[R]

The buildinId to use when this named style is applied @return [Integer] @see Axlsx::NumFmt

customBuiltin[R]

Indicates that the build in style reference has been customized. @return [Boolean]

hidden[R]

Determines if this named style should show in the list of styles when using excel @return [Boolean]

iLevel[R]

Determines if this formatting is for an outline style, and what level of the outline it is to be applied to. @return [Integer]

name[R]

The name of this cell style @return [String]

xfId[R]

The formatting record id this named style utilizes @return [Integer] @see Axlsx::Xf

Public Class Methods

new(options={}) click to toggle source

Creats a new CellStyle object @option options [String] name @option options [Integer] xfId @option options [Integer] buildinId @option options [Integer] iLevel @option options [Boolean] hidden @option options [Boolean] customBuiltIn

# File lib/axlsx/stylesheet/cell_style.rb, line 18
def initialize(options={})
  parse_options options
end

Public Instance Methods

builtinId=(v) click to toggle source

@see builtinId

# File lib/axlsx/stylesheet/cell_style.rb, line 55
def builtinId=(v) Axlsx::validate_unsigned_int v; @builtinId = v end
customBuiltin=(v) click to toggle source

@see customBuiltin

# File lib/axlsx/stylesheet/cell_style.rb, line 61
def customBuiltin=(v) Axlsx::validate_boolean v; @customBuiltin = v end
hidden=(v) click to toggle source

@see hidden

# File lib/axlsx/stylesheet/cell_style.rb, line 59
def hidden=(v) Axlsx::validate_boolean v; @hidden = v end
iLevel=(v) click to toggle source

@see iLivel

# File lib/axlsx/stylesheet/cell_style.rb, line 57
def iLevel=(v) Axlsx::validate_unsigned_int v; @iLevel = v end
name=(v) click to toggle source

@see name

# File lib/axlsx/stylesheet/cell_style.rb, line 51
def name=(v)  Axlsx::validate_string v; @name = v end
to_xml_string(str = '') click to toggle source

Serializes the object @param [String] str @return [String]

# File lib/axlsx/stylesheet/cell_style.rb, line 66
def to_xml_string(str = '')
  serialized_tag('cellStyle', str)
end
xfId=(v) click to toggle source

@see xfId

# File lib/axlsx/stylesheet/cell_style.rb, line 53
def xfId=(v) Axlsx::validate_unsigned_int v; @xfId = v end