diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_pr.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/sheet_pr.rb b/lib/axlsx/workbook/worksheet/sheet_pr.rb index f271419b..a299bc0f 100644 --- a/lib/axlsx/workbook/worksheet/sheet_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_pr.rb @@ -8,7 +8,7 @@ module Axlsx serializable_attributes :sync_horizontal, :sync_vertical, - :transtion_evaluation, + :transition_evaluation, :transition_entry, :published, :filter_mode, @@ -20,7 +20,7 @@ module Axlsx # waving magic show to set up the attriubte accessors boolean_attr_accessor :sync_horizontal, :sync_vertical, - :transtion_evaluation, + :transition_evaluation, :transition_entry, :published, :filter_mode, @@ -40,12 +40,17 @@ module Axlsx # @return [Worksheet] attr_reader :worksheet + # The tab color of the sheet. + # @return [Color] + attr_reader :tab_color + # Serialize the object # @param [String] str serialized output will be appended to this object if provided. # @return [String] def to_xml_string(str = '') update_properties str << "<sheetPr #{serialized_attributes}>" + tab_color.to_xml_string(str, 'tabColor') if tab_color page_setup_pr.to_xml_string(str) str << "</sheetPr>" end @@ -56,6 +61,11 @@ module Axlsx @page_setup_pr ||= PageSetUpPr.new end + # @see tab_color + def tab_color=(v) + @tab_color ||= Color.new(:rgb => v) + end + private def update_properties |
