summaryrefslogtreecommitdiffhomepage
path: root/examples/row_heights_example.md
blob: 5a632cdcf1e0a944df54c5dd087de1ef06a7b609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Description

You can set the row heights

## Code

```ruby
require 'axlsx'

p = Axlsx::Package.new
wb = p.workbook

wb.add_worksheet(name: 'Row heights') do |sheet|
  sheet.add_row ['This row will have a fixed height', 'It will overwite the default row height'], height: 30
  sheet.add_row ['This row can have a different height too'], height: 10
  sheet.add_row ['This row is the original']
end

p.serialize 'row_heights_example.xlsx'
```

## Output

![Output](images/row_heights_example.png "Output")