diff options
| author | Randy Morgan <[email protected]> | 2012-07-31 13:06:33 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-07-31 13:17:03 +0900 |
| commit | c2a4f6a0f0c74b337447343e5f72674695737d88 (patch) | |
| tree | 24e9c7c2a86aa85b16862d037c8660df22bbc473 /examples | |
| parent | a4067c3301aea5470c636d206034e4e787196df6 (diff) | |
| download | caxlsx-c2a4f6a0f0c74b337447343e5f72674695737d88.tar.gz caxlsx-c2a4f6a0f0c74b337447343e5f72674695737d88.zip | |
Adding in proper defined names so we can repeat header rows for each printed page.
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/example.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb index 9a355036..2da0f5f2 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -314,6 +314,12 @@ wb.add_worksheet(:name => "No Gridlines") do |sheet| end ##``` +#```ruby +wb.add_worksheet(:name => "repeated header") do |sheet| + sheet.add_row %w(These Column Header Will Render On Every Printed Sheet) + 200.times { sheet.add_row %w(1 2 3 4 5 6 7 8) } + wb.add_defined_name("'repeated header'!$1:$1", :local_sheet_id => sheet.index, :name => '_xlnm.Print_Titles') +end # Sheet Protection and excluding cells from locking. unlocked = wb.styles.add_style :locked => false |
