class Xlsxrb::Ooxml::WorksheetParser::ColumnsListener
Parses <cols> section for column definitions.
Attributes
columns
[R]
untyped
Public Class Methods
() → untyped
Source
# File lib/xlsxrb/ooxml/worksheet_parser.rb, line 448 def initialize @columns = [] @in_cols = false end
Public Instance Methods
(untyped _text) → untyped
Source
# File lib/xlsxrb/ooxml/worksheet_parser.rb, line 476 def characters(_text); end
(untyped _uri, untyped localname, untyped _qname) → untyped
Source
# File lib/xlsxrb/ooxml/worksheet_parser.rb, line 472 def end_element(_uri, localname, _qname) @in_cols = false if localname == "cols" end
(untyped _uri, untyped localname, untyped _qname, untyped attrs) → untyped
Source
# File lib/xlsxrb/ooxml/worksheet_parser.rb, line 453 def start_element(_uri, localname, _qname, attrs) case localname when "cols" @in_cols = true when "col" return unless @in_cols col = { min: attrs["min"]&.to_i, max: attrs["max"]&.to_i, width: attrs["width"]&.to_f, hidden: attrs["hidden"] == "1", custom_width: attrs["customWidth"] == "1", outline_level: attrs["outlineLevel"]&.to_i } @columns << col end end