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 /examples | |
| parent | 5a343241ed5ae7226ce691256118e51b44c60f87 (diff) | |
| parent | 0c0d9d6e6efa95cf9e4ce1cb562345d9c5be2526 (diff) | |
| download | caxlsx-dbb456aa65c7637233da174a5d515c80fe04aefd.tar.gz caxlsx-dbb456aa65c7637233da174a5d515c80fe04aefd.zip | |
Merge branch 'shifakhan-worksheet_tab_colour'
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/example.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/examples/example.rb b/examples/example.rb index 15d34ed6..72066140 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -51,6 +51,7 @@ examples << :no_autowidth examples << :cached_formula examples << :page_breaks examples << :rich_text +examples << :tab_color p = Axlsx::Package.new wb = p.workbook @@ -676,7 +677,7 @@ end ## Book Views # -## Book views let you specify which sheet the show as active when the user opens the work book as well as a bunch of other +## Book views let you specify which sheet the show as active when the user opens the work book as well as a bunch of other ## tuning values for the UI @see Axlsx::WorkbookView ## ```ruby if examples.include? :book_view @@ -843,3 +844,18 @@ if examples.include? :rich_text p.serialize 'rich_text.xlsx' end #``` + +##Change tab color of sheet + +#```ruby +if examples.include? :tab_color + p = Axlsx::Package.new + p.use_shared_strings = true + wb = p.workbook + wb.add_worksheet(:name => "Change Tab Color") do |sheet| + sheet.add_row ["Check", "out", "the", "Tab Color", "below!"] + sheet.sheet_pr.tab_color = "FFFF6666" + end + p.serialize 'tab_color.xlsx' +end +##``` |
