Class: Axlsx::App

Inherits:
Object
  • Object
show all
Includes:
OptionsParser
Defined in:
lib/axlsx/doc_props/app.rb

Overview

Note:

Support is not implemented for the following complex types:

HeadingPairs (VectorVariant), TitlesOfParts (VectorLpstr), HLinks (VectorVariant), DigSig (DigSigBlob)

App represents the app.xml document. The attributes for this object are primarily managed by the application the end user uses to edit the document. None of the attributes are required to serialize a valid xlsx object.

See Also:

  • shared-documentPropertiesExtendedshared-documentPropertiesExtended.xsd

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from OptionsParser

#parse_options

Constructor Details

#initialize(options = {}) ⇒ App

Creates an App object

Options Hash (options):

  • template (String)
  • manager (String)
  • pages (Integer)
  • words (Integer)
  • characters (Integer)
  • presentation_format (String)
  • lines (Integer)
  • paragraphs (Integer)
  • slides (Integer)
  • notes (Integer)
  • total_time (Integer)
  • hidden_slides (Integer)
  • m_m_clips (Integer)
  • scale_crop (Boolean)
  • links_up_to_date (Boolean)
  • characters_with_spaces (Integer)
  • share_doc (Boolean)
  • hyperlink_base (String)
  • hyperlinks_changed (String)
  • application (String)
  • app_version (String)
  • doc_security (Integer)


36
37
38
# File 'lib/axlsx/doc_props/app.rb', line 36

def initialize(options = {})
  parse_options options
end

Instance Attribute Details

#app_versionString Also known as: AppVersion



125
126
127
# File 'lib/axlsx/doc_props/app.rb', line 125

def app_version
  @app_version
end

#applicationString (readonly) Also known as: Applicatoin



121
122
123
# File 'lib/axlsx/doc_props/app.rb', line 121

def application
  @application
end

#charactersInteger Also known as: Characters



61
62
63
# File 'lib/axlsx/doc_props/app.rb', line 61

def characters
  @characters
end

#characters_with_spacesInteger Also known as: CharactersWithSpaces



105
106
107
# File 'lib/axlsx/doc_props/app.rb', line 105

def characters_with_spaces
  @characters_with_spaces
end

#companyString Also known as: Company



49
50
51
# File 'lib/axlsx/doc_props/app.rb', line 49

def company
  @company
end

#doc_securityInteger Also known as: DocSecurity



129
130
131
# File 'lib/axlsx/doc_props/app.rb', line 129

def doc_security
  @doc_security
end

#hidden_slidesInteger Also known as: HiddenSlides



89
90
91
# File 'lib/axlsx/doc_props/app.rb', line 89

def hidden_slides
  @hidden_slides
end


113
114
115
# File 'lib/axlsx/doc_props/app.rb', line 113

def hyperlink_base
  @hyperlink_base
end


117
118
119
# File 'lib/axlsx/doc_props/app.rb', line 117

def hyperlinks_changed
  @hyperlinks_changed
end

#linesInteger Also known as: Lines



69
70
71
# File 'lib/axlsx/doc_props/app.rb', line 69

def lines
  @lines
end


101
102
103
# File 'lib/axlsx/doc_props/app.rb', line 101

def links_up_to_date
  @links_up_to_date
end

#m_m_clipsInteger Also known as: MMClips



93
94
95
# File 'lib/axlsx/doc_props/app.rb', line 93

def m_m_clips
  @m_m_clips
end

#managerString Also known as: Manager



45
46
47
# File 'lib/axlsx/doc_props/app.rb', line 45

def manager
  @manager
end

#notesInteger Also known as: Notes



81
82
83
# File 'lib/axlsx/doc_props/app.rb', line 81

def notes
  @notes
end

#pagesInteger Also known as: Pages



53
54
55
# File 'lib/axlsx/doc_props/app.rb', line 53

def pages
  @pages
end

#paragraphsInteger Also known as: Paragraphs



73
74
75
# File 'lib/axlsx/doc_props/app.rb', line 73

def paragraphs
  @paragraphs
end

#presentation_formatString Also known as: PresentationFormat



65
66
67
# File 'lib/axlsx/doc_props/app.rb', line 65

def presentation_format
  @presentation_format
end

#scale_cropBoolean Also known as: ScaleCrop



97
98
99
# File 'lib/axlsx/doc_props/app.rb', line 97

def scale_crop
  @scale_crop
end

#shared_docBoolean Also known as: SharedDoc



109
110
111
# File 'lib/axlsx/doc_props/app.rb', line 109

def shared_doc
  @shared_doc
end

#slidesIntger Also known as: Slides



77
78
79
# File 'lib/axlsx/doc_props/app.rb', line 77

def slides
  @slides
end

#templateString Also known as: Template



41
42
43
# File 'lib/axlsx/doc_props/app.rb', line 41

def template
  @template
end

#total_timeInteger Also known as: TotalTime



85
86
87
# File 'lib/axlsx/doc_props/app.rb', line 85

def total_time
  @total_time
end

#wordsInteger Also known as: Words



57
58
59
# File 'lib/axlsx/doc_props/app.rb', line 57

def words
  @words
end

Instance Method Details

#to_xml_string(str = '') ⇒ String

Serialize the app.xml document



220
221
222
223
224
225
226
227
228
# File 'lib/axlsx/doc_props/app.rb', line 220

def to_xml_string(str = '')
  str << '<?xml version="1.0" encoding="UTF-8"?>'
  str << ('<Properties xmlns="' << APP_NS << '" xmlns:vt="' << APP_NS_VT << '">')
  Axlsx.instance_values_for(self).each do |key, value|
    node_name = Axlsx.camel(key)
    str << "<#{node_name}>#{value}</#{node_name}>"
  end
  str << '</Properties>'
end