summaryrefslogtreecommitdiffhomepage
path: root/examples/example.rb
diff options
context:
space:
mode:
authorJonathan Tron <[email protected]>2015-07-04 11:55:35 +0200
committerJonathan Tron <[email protected]>2015-07-04 11:55:35 +0200
commit0c0d9d6e6efa95cf9e4ce1cb562345d9c5be2526 (patch)
treee3bc414a75b2a56ae08287759a17e6d1821ae74c /examples/example.rb
parent69bcb479a3a3f279a8f395e02f7191ba2bd4152d (diff)
downloadcaxlsx-0c0d9d6e6efa95cf9e4ce1cb562345d9c5be2526.tar.gz
caxlsx-0c0d9d6e6efa95cf9e4ce1cb562345d9c5be2526.zip
Add test, fix example with tab color generation and fix a but due to a typo
Diffstat (limited to 'examples/example.rb')
-rwxr-xr-xexamples/example.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/example.rb b/examples/example.rb
index fb4fc924..72066140 100755
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -677,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
@@ -849,9 +849,13 @@ end
#```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
-##``` \ No newline at end of file
+##```