class OoxmlParser::ExcelComments
All Comments
of single XLSX
Attributes
@return [CommentList] list of comments
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/excel_comments.rb, line 13 def initialize(parent: nil) @authors = [] @comment_list = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/excel_comments.rb, line 20 def comments comment_list.comments end
@return [Array<ExcelComment>] list of comments
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/excel_comments.rb, line 30 def parse(file) doc = parse_xml(file) node = doc.xpath('*').first node.xpath('*').each do |node_child| case node_child.name when 'authors' @authors << Author.new(parent: self).parse(node_child) when 'commentList' @comment_list = CommentList.new(parent: self).parse(node_child) end end self end
Parse file with ExcelComments
@param file [String] file to parse @return [ExcelComments] object with data