class RubyXL::DocumentPropertiesFile

www.schemacentral.com/sc/ooxml/e-extended-properties_Properties.html

Constants

CONTENT_TYPE
REL_TYPE

Attributes

workbook[RW]

Public Instance Methods

add_part_title(name) click to toggle source
# File lib/rubyXL/objects/document_properties.rb, line 51
def add_part_title(name)
  titles_of_parts.vt_vector.vt_lpstr << RubyXL::StringNode.new(:value => name)
end
before_write_xml() click to toggle source
# File lib/rubyXL/objects/document_properties.rb, line 56
def before_write_xml
  if @workbook then
    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'))

    add_parts_count('Worksheets', @workbook.worksheets.size)
    @workbook.worksheets.each { |sheet| add_part_title(sheet.sheet_name) }

    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
  end

  true
end
xlsx_path() click to toggle source
# File lib/rubyXL/objects/document_properties.rb, line 73
def xlsx_path
  File.join('docProps', 'app.xml')
end