Class: Axlsx::RowBreaks
- Inherits:
-
SimpleTypedList
- Object
- SimpleTypedList
- Axlsx::RowBreaks
- Defined in:
- lib/axlsx/workbook/worksheet/row_breaks.rb
Overview
A collection of break objects that define row breaks (page breaks) for printing and preview
Instance Method Summary collapse
-
#add_break(options) ⇒ Object
Adds a row break max and man values are fixed.
-
#initialize ⇒ RowBreaks
constructor
A new instance of RowBreaks.
-
#to_xml_string(str = '') ⇒ Object
Constructor Details
Instance Method Details
#add_break(options) ⇒ Object
Adds a row break max and man values are fixed.
15 16 17 18 19 |
# File 'lib/axlsx/workbook/worksheet/row_breaks.rb', line 15 def add_break() # force feed the excel default @list << Break.new(.merge(:max => 16383, :man => true)) last end |
#to_xml_string(str = '') ⇒ Object
26 27 28 29 30 31 |
# File 'lib/axlsx/workbook/worksheet/row_breaks.rb', line 26 def to_xml_string(str='') return if empty? str << '<rowBreaks count="' << @list.size.to_s << '" manualBreakCount="' << @list.size.to_s << '">' each { |brk| brk.to_xml_string(str) } str << '</rowBreaks>' end |