Class: Axlsx::App

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(options = {}) ⇒ App

Creates an App object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • Template (String)
  • Manager (String)
  • Pages (Integer)
  • Words (Integer)
  • Characters (Integer)
  • PresentationFormat (String)
  • Lines (Integer)
  • Paragraphs (Integer)
  • Slides (Integer)
  • Notes (Integer)
  • TotalTime (Integer)
  • HiddenSlides (Integer)
  • MMClips (Integer)
  • ScaleCrop (Boolean)
  • LinksUpToDate (Boolean)
  • CharactersWithSpaces (Integer)
  • ShareDoc (Boolean)
  • HyperLinkBase (String)
  • HyperlinksChanged (String)
  • Application (String)
  • AppVersion (String)
  • DocSecurity (Integer)


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

def initialize(options={})
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
  end
end

Instance Attribute Details

#ApplicationString

Returns The name of the application.

Returns:

  • (String)

    The name of the application



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

def Application
  @Application
end

#AppVersionString

Returns The version of the application.

Returns:

  • (String)

    The version of the application.



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

def AppVersion
  @AppVersion
end

#CharactersInteger

Returns The number of characters in the document.

Returns:

  • (Integer)

    The number of characters in the document.



29
30
31
# File 'lib/axlsx/doc_props/app.rb', line 29

def Characters
  @Characters
end

#CharactersWithSpacesInteger

Returns The number of characters in the document including spaces.

Returns:

  • (Integer)

    The number of characters in the document including spaces.



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

def CharactersWithSpaces
  @CharactersWithSpaces
end

#CompanyString

Returns The name of the company generating the document.

Returns:

  • (String)

    The name of the company generating the document.



20
21
22
# File 'lib/axlsx/doc_props/app.rb', line 20

def Company
  @Company
end

#DocSecurityInteger

Returns Document security.

Returns:

  • (Integer)

    Document security



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

def DocSecurity
  @DocSecurity
end

#HiddenSlidesInteger

Returns The number of hidden slides.

Returns:

  • (Integer)

    The number of hidden slides.



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

def HiddenSlides
  @HiddenSlides
end

#HyperLinkBaseString

Returns The base for hyper links in the document.

Returns:

  • (String)

    The base for hyper links in the document.



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

def HyperLinkBase
  @HyperLinkBase
end

#HyperlinksChangedBoolean

Returns Indicates that the hyper links in the document have been changed.

Returns:

  • (Boolean)

    Indicates that the hyper links in the document have been changed.



71
72
73
# File 'lib/axlsx/doc_props/app.rb', line 71

def HyperlinksChanged
  @HyperlinksChanged
end

#LinesInteger

Returns The number of lines in the document.

Returns:

  • (Integer)

    The number of lines in the document.



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

def Lines
  @Lines
end

#LinksUpToDateBoolean

Returns The links in the document are up to date.

Returns:

  • (Boolean)

    The links in the document are up to date.



59
60
61
# File 'lib/axlsx/doc_props/app.rb', line 59

def LinksUpToDate
  @LinksUpToDate
end

#ManagerString

Returns The name of the manager for the document.

Returns:

  • (String)

    The name of the manager for the document.



17
18
19
# File 'lib/axlsx/doc_props/app.rb', line 17

def Manager
  @Manager
end

#MMClipsInteger

Returns The total number multimedia clips.

Returns:

  • (Integer)

    The total number multimedia clips



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

def MMClips
  @MMClips
end

#NotesInteger

Returns The number of slides that have notes.

Returns:

  • (Integer)

    The number of slides that have notes.



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

def Notes
  @Notes
end

#PagesInteger

Returns The number of pages in the document.

Returns:

  • (Integer)

    The number of pages in the document.



23
24
25
# File 'lib/axlsx/doc_props/app.rb', line 23

def Pages
  @Pages
end

#ParagraphsInteger

Returns The number of paragraphs in the document.

Returns:

  • (Integer)

    The number of paragraphs in the document



38
39
40
# File 'lib/axlsx/doc_props/app.rb', line 38

def Paragraphs
  @Paragraphs
end

#PresentationFormatString

Returns The intended format of the presentation.

Returns:

  • (String)

    The intended format of the presentation.



32
33
34
# File 'lib/axlsx/doc_props/app.rb', line 32

def PresentationFormat
  @PresentationFormat
end

#ScaleCropBoolean

Returns The display mode for the document thumbnail.

Returns:

  • (Boolean)

    The display mode for the document thumbnail.



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

def ScaleCrop
  @ScaleCrop
end

#ShareDocBoolean

Returns Indicates if the document is shared.

Returns:

  • (Boolean)

    Indicates if the document is shared.



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

def ShareDoc
  @ShareDoc
end

#SlidesIntger

Returns The number of slides in the document.

Returns:

  • (Intger)

    The number of slides in the document.



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

def Slides
  @Slides
end

#TemplateString

Returns The name of the document template.

Returns:

  • (String)

    The name of the document template.



14
15
16
# File 'lib/axlsx/doc_props/app.rb', line 14

def Template
  @Template
end

#TotalTimeInteger

Returns The total amount of time spent editing.

Returns:

  • (Integer)

    The total amount of time spent editing.



47
48
49
# File 'lib/axlsx/doc_props/app.rb', line 47

def TotalTime
  @TotalTime
end

#WordsInteger

Returns The number of words in the document.

Returns:

  • (Integer)

    The number of words in the document.



26
27
28
# File 'lib/axlsx/doc_props/app.rb', line 26

def Words
  @Words
end

Instance Method Details

#to_xml_string(str = '') ⇒ String

Serialize the app.xml document

Returns:

  • (String)


167
168
169
170
171
172
# File 'lib/axlsx/doc_props/app.rb', line 167

def to_xml_string(str = '')
  str << '<?xml version="1.0" encoding="UTF-8"?>'
  str << '<Properties xmlns="' << APP_NS << '" xmlns:vt="' << APP_NS_VT << '">'
  str << instance_values.map { |key, value| '<' << key.to_s << '>' << value.to_s << '</' << key.to_s << '>' }.join
  str << '</Properties>'
end