summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-06-09 11:42:28 +0900
committerRandy Morgan <[email protected]>2012-06-09 11:42:28 +0900
commit4357178e58e5dae840ec47f63c11e13929a66a8d (patch)
tree8f9a1979ef85f069b555adcb48ea560d69dbbd55 /examples
parentfa35f57cb658cb174fa80332bbe808a0e7374d96 (diff)
downloadcaxlsx-4357178e58e5dae840ec47f63c11e13929a66a8d.tar.gz
caxlsx-4357178e58e5dae840ec47f63c11e13929a66a8d.zip
add frozen header example
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/example.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb
index 446dd79c..23fc30d0 100755
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -350,6 +350,20 @@ wb.add_worksheet(:name => 'comments') do |sheet|
sheet.add_comment :ref => 'A1', :author => 'Bob', :text => 'Yes We Can!'
end
+## Frozen/Split panes
+## ``` ruby
+wb.add_worksheet(:name => 'fixed headers') do |sheet|
+ sheet.add_row(['', (0..99).map { |i| "column header #{i}" }].flatten )
+ 100.times.with_index { |index| sheet << ["row header", (0..index).to_a].flatten }
+ sheet.sheet_view.pane do |pane|
+ pane.top_left_cell = "B2"
+ pane.state = :frozen_split
+ pane.y_split = 1
+ pane.x_split = 1
+ pane.active_pane = :bottom_right
+ end
+end
+
##Validate and Serialize
#```ruby