class OoxmlParser::Formula
Class for parsing ‘formulas` <f>
Attributes
@return [Coordinates] reference coordinates
@return [StringIndex] string index
@return [String] type
@return [String] value
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_row/xlsx_cell/formula.rb, line 35 def empty? !(reference || string_index || type || value) end
@return [True, False] check if formula empty
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/xlsx_row/xlsx_cell/formula.rb, line 18 def parse(node) node.attributes.each do |key, value| case key when 'ref' @reference = Coordinates.parser_coordinates_range(value.value.to_s) when 'si' @string_index = value.value.to_i when 't' @type = value.value.to_s end end @value = node.text unless node.text.empty? self end
Parse Formula
object @param node [Nokogiri::XML:Element] node to parse @return [Formula] parsed object