summaryrefslogtreecommitdiffhomepage
path: root/examples/tab_color_example.md
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tab_color_example.md')
-rw-r--r--examples/tab_color_example.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/tab_color_example.md b/examples/tab_color_example.md
new file mode 100644
index 00000000..31374e1e
--- /dev/null
+++ b/examples/tab_color_example.md
@@ -0,0 +1,23 @@
+## Description
+
+Change the color of the sheet tab.
+
+## Code
+
+```ruby
+require 'axlsx'
+
+p = Axlsx::Package.new
+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_example.xlsx'
+```
+
+## Output
+
+![Output](images/tab_color_example.png "Output")