class OoxmlParser::SheetView
Class for ‘sheetView` data
Attributes
@return [Selection] Properties of selection
@return [True, False] Flag indicating whether this sheet should display gridlines.
@return [True, False] Flag indicating whether the sheet should display row and column headings.
@return [Coordinates] Reference to the top left cell
@return [Integer] Id of workbook view
@return [Integer] Zoom scale
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view.rb, line 22 def initialize(parent: nil) @show_gridlines = true @show_row_column_headers = true super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/sheet_view.rb, line 31 def parse(node) node.attributes.each do |key, value| case key when 'showGridLines' @show_gridlines = boolean_attribute_value(value) when 'showRowColHeaders' @show_row_column_headers = boolean_attribute_value(value) when 'topLeftCell' @top_left_cell = Coordinates.new.parse_string(value.value) when 'workbookViewId' @workbook_view_id = value.value.to_i when 'zoomScale' @zoom_scale = value.value.to_i end end node.xpath('*').each do |node_child| case node_child.name when 'pane' @pane = Pane.new(parent: self).parse(node_child) when 'selection' @selection = Selection.new(parent: self).parse(node_child) end end self end
Parse SheetView
object @param node [Nokogiri::XML:Element] node to parse @return [SheetView] result of parsing