Class: OoxmlParser::TableStyleInfo
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableStyleInfo
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/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
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
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).
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 9 def name @name end |
#show_column_stripes ⇒ True, False
Returns A Boolean indicating whether column stripe formatting is applied.
14 15 16 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 14 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.
12 13 14 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 12 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.
16 17 18 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 16 def show_last_column @show_last_column end |
#show_row_stripes ⇒ True, False
Returns A Boolean indicating whether row stripe formatting is applied.
18 19 20 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 18 def show_row_stripes @show_row_stripes end |
Instance Method Details
#parse(node) ⇒ TableStyleInfo
Parse TableStyleInfo data
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/table_style_info.rb', line 23 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 |