summaryrefslogtreecommitdiffhomepage
path: root/examples/tab_color_example.md
blob: 31374e1e6300482d5dc464cae3ec82282a5dd3fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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")