class Axlsx::SheetFormatPr

Sheet formatting properties

<xsd:complexType name="CT_SheetFormatPr">
  <xsd:attribute name="baseColWidth" type="xsd:unsignedInt" use="optional" default="8"/>
  <xsd:attribute name="defaultColWidth" type="xsd:double" use="optional"/>
  <xsd:attribute name="defaultRowHeight" type="xsd:double" use="required"/>
  <xsd:attribute name="customHeight" type="xsd:boolean" use="optional" default="false"/>
  <xsd:attribute name="zeroHeight" type="xsd:boolean" use="optional" default="false"/>
  <xsd:attribute name="thickTop" type="xsd:boolean" use="optional" default="false"/>
  <xsd:attribute name="thickBottom" type="xsd:boolean" use="optional" default="false"/>
  <xsd:attribute name="outlineLevelRow" type="xsd:unsignedByte" use="optional" default="0"/>
  <xsd:attribute name="outlineLevelCol" type="xsd:unsignedByte" use="optional" default="0"/>

</xsd:complexType>

Public Class Methods

new(options={}) click to toggle source

creates a new sheet_format_pr object @param [Hash] options initialization options @option [Integer] base_col_width Specifies the number of characters of the maximum digit width of the normal style's font. This value does not include margin padding or extra padding for gridlines. It is only the number of characters. @option [Float] default_col_width Default column width measured as the number of characters of the maximum digit width of the normal style's font. @option [Float] default_row_height Default row height measured in point size. Optimization so we don't have to write the height on all rows. This can be written out if most rows have custom height, to achieve the optimization. @option [Boolean] custom_height 'True' if defaultRowHeight value has been manually set, or is different from the default value. @option [Boolean] zero_height 'True' if rows are hidden by default. This setting is an optimization used when most rows of the sheet are hidden. @option [Boolean] think_top 'True' if rows have a thick top border by default. @option [Boolean] thick_bottom 'True' if rows have a thick bottom border by default. @option [Integer] outline_level_row Highest number of outline level for rows in this sheet. These values shall be in synch with the actual sheet outline levels. @option [Integer] outline_level_col Highest number of outline levels for columns in this sheet. These values shall be in synch with the actual sheet outline levels.

# File lib/axlsx/workbook/worksheet/sheet_format_pr.rb, line 32
def initialize(options={})
  set_defaults
  parse_options options
end

Public Instance Methods

to_xml_string(str='') click to toggle source

serializes this object to an xml string @param [String] str The string this objects serialization will be appended to @return [String]

# File lib/axlsx/workbook/worksheet/sheet_format_pr.rb, line 50
def to_xml_string(str='')
  str << "<sheetFormatPr #{serialized_attributes}/>"
end

Private Instance Methods

set_defaults() click to toggle source
# File lib/axlsx/workbook/worksheet/sheet_format_pr.rb, line 55
def set_defaults
  @base_col_width = 8
  @default_row_height = 18
end