diff options
| author | Jonathan Tron <[email protected]> | 2015-07-04 11:56:39 +0200 |
|---|---|---|
| committer | Jonathan Tron <[email protected]> | 2015-07-04 11:56:39 +0200 |
| commit | dbb456aa65c7637233da174a5d515c80fe04aefd (patch) | |
| tree | e3bc414a75b2a56ae08287759a17e6d1821ae74c /lib | |
| parent | 5a343241ed5ae7226ce691256118e51b44c60f87 (diff) | |
| parent | 0c0d9d6e6efa95cf9e4ce1cb562345d9c5be2526 (diff) | |
| download | caxlsx-dbb456aa65c7637233da174a5d515c80fe04aefd.tar.gz caxlsx-dbb456aa65c7637233da174a5d515c80fe04aefd.zip | |
Merge branch 'shifakhan-worksheet_tab_colour'
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 |
