blob: b5e5ede31f5d618161c779d6fc12c5412490ec4c (
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
25
|
## Description
This is a very basic example with a worksheet and two rows of data.
## Code
```ruby
require 'axlsx'
p = Axlsx::Package.new
wb = p.workbook
wb.add_worksheet(name: 'Basic Worksheet') do |sheet|
sheet.add_row ['This is the first line']
sheet.add_row ['This is the second line']
sheet.add_page_break('B2')
sheet.sheet_view.view = :page_layout # so you can see the breaks!
end
p.serialize 'page_break_example.xlsx'
```
## Output

|