Class: OoxmlParser::TableStyleInfo
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableStyleInfo
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb
Overview
Class for ‘tableStyleInfo` data msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.tablestyleinfo.aspx
Instance Attribute Summary collapse
-
#name ⇒ String
If the style name does not correspond to the name of a table style then the spreadsheet application should use default style.
-
#show_column_stripes ⇒ True, False
A Boolean indicating whether column stripe formatting is applied.
-
#show_first_column ⇒ True, False
A Boolean indicating whether the first column in the table should have the style applied.
-
#show_last_column ⇒ True, False
A Boolean indicating whether the last column in the table should have the style applied.
-
#show_row_stripes ⇒ True, False
A Boolean indicating whether row stripe formatting is applied.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TableStyleInfo
Parse TableStyleInfo data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#name ⇒ String
If the style name does not correspond to the name of a table style then the spreadsheet application should use default style. The possible values for this attribute are defined by the ST_Xstring simple type (22.9.2.19).
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 11 def name @name end |
#show_column_stripes ⇒ True, False
Returns A Boolean indicating whether column stripe formatting is applied.
16 17 18 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 16 def show_column_stripes @show_column_stripes end |
#show_first_column ⇒ True, False
Returns A Boolean indicating whether the first column in the table should have the style applied.
14 15 16 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 14 def show_first_column @show_first_column end |
#show_last_column ⇒ True, False
Returns A Boolean indicating whether the last column in the table should have the style applied.
18 19 20 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 18 def show_last_column @show_last_column end |
#show_row_stripes ⇒ True, False
Returns A Boolean indicating whether row stripe formatting is applied.
20 21 22 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 20 def show_row_stripes @show_row_stripes end |
Instance Method Details
#parse(node) ⇒ TableStyleInfo
Parse TableStyleInfo data
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_style_info.rb', line 25 def parse(node) node.attributes.each do |key, value| case key when 'name' @name = value.value.to_s when 'showColumnStripes' @show_column_stripes = attribute_enabled?(value) when 'showFirstColumn' @show_first_column = attribute_enabled?(value) when 'showLastColumn' @show_last_column = attribute_enabled?(value) when 'showRowStripes' @show_row_stripes = attribute_enabled?(value) end end self end |