summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/row_breaks.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-09-10 10:08:00 +0900
committerRandy Morgan <[email protected]>2013-09-13 00:08:39 +0900
commit2067c6940fc3a7ef1e8398474ac2c862130504ce (patch)
tree0740f40483727e8bdba858831bb550e8b8b9fe50 /lib/axlsx/workbook/worksheet/row_breaks.rb
parent877a38dc528b0c579ca753af6354796d0d572cdd (diff)
downloadcaxlsx-2067c6940fc3a7ef1e8398474ac2c862130504ce.tar.gz
caxlsx-2067c6940fc3a7ef1e8398474ac2c862130504ce.zip
Page Breaks - round one
This sets up the basic col and row break creation and serialization. You can specify either a string reference like "C7" or provide an Axlsx::Cell instance to specify the break point. Serialization is working cleanly but excel does not automatically render those breaks yet. You need to switch to page preview mode.
Diffstat (limited to 'lib/axlsx/workbook/worksheet/row_breaks.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/row_breaks.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/row_breaks.rb b/lib/axlsx/workbook/worksheet/row_breaks.rb
index 8a826ed1..2af7216d 100644
--- a/lib/axlsx/workbook/worksheet/row_breaks.rb
+++ b/lib/axlsx/workbook/worksheet/row_breaks.rb
@@ -14,10 +14,14 @@ module Axlsx
@list << Break.new(options)
last
end
-
+ # <rowBreaks count="3" manualBreakCount="3">
+ # <brk id="1" max="16383" man="1"/>
+ # <brk id="7" max="16383" man="1"/>
+ # <brk id="13" max="16383" man="1"/>
+ # </rowBreaks>
def to_xml_string(str='')
return if empty?
- str << '<rowBreaks count="' << @list.size << '" manualBreakCount="' << @list.size << '">'
+ str << '<rowBreaks count="' << @list.size.to_s << '" manualBreakCount="' << @list.size.to_s << '">'
each { |brk| brk.to_xml_string(str) }
str << '</rowBreaks>'
end