class RubyXL::DocumentPropertiesFile
www.datypic.com/sc/ooxml/e-extended-properties_Properties.html
Constants
- CONTENT_TYPE
- REL_TYPE
Attributes
workbook[RW]
Public Instance Methods
before_write_xml()
click to toggle source
# File lib/rubyXL/objects/document_properties.rb, line 57 def before_write_xml workbook = root.workbook self.heading_pairs = RubyXL::VectorValue.new(:vt_vector => RubyXL::Vector.new(:base_type => 'variant')) self.titles_of_parts = RubyXL::VectorValue.new(:vt_vector => RubyXL::Vector.new(:base_type => 'lpstr')) worksheets = chartsheets = 0 workbook.worksheets.each { |sheet| add_part_title(sheet.sheet_name) case sheet when RubyXL::Worksheet then worksheets += 1 when RubyXL::Chartsheet then chartsheets += 1 end } add_parts_count('Worksheets', worksheets) if worksheets > 0 add_parts_count('Charts', chartsheets) if chartsheets > 0 if workbook.defined_names then add_parts_count('Named Ranges', workbook.defined_names.size) workbook.defined_names.each { |defined_name| add_part_title(defined_name.name) } end true end
xlsx_path()
click to toggle source
# File lib/rubyXL/objects/document_properties.rb, line 84 def xlsx_path ROOT.join('docProps', 'app.xml') end