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:

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (String) Application

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

- (String) AppVersion

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

- (Integer) Characters

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

- (Integer) CharactersWithSpaces

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

- (String) Company

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

- (Integer) DocSecurity

Document security

Returns:

  • (Integer)

    Document security



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

def DocSecurity
  @DocSecurity
end

- (Integer) HiddenSlides

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

- (String) HyperLinkBase

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

- (Boolean) HyperlinksChanged

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

- (Integer) Lines

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

- (Boolean) LinksUpToDate

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

- (String) Manager

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

- (Integer) MMClips

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

- (Integer) Notes

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

- (Integer) Pages

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

- (Integer) Paragraphs

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

- (String) PresentationFormat

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

- (Boolean) ScaleCrop

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

- (Boolean) ShareDoc

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

- (Intger) Slides

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

- (String) Template

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

- (Integer) TotalTime

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

- (Integer) Words

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

- (Object) initalize(options = {})

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 initalize(options={})
  options.each do |o|
    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
  end
end

- (String) to_xml

Generate an app.xml document

Returns:

  • (String)

    The document as a string



137
138
139
140
141
142
143
144
145
146
# File 'lib/axlsx/doc_props/app.rb', line 137

def to_xml()
  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    xml.send(:Properties, :xmlns => APP_NS, :'xmlns:vt' => APP_NS_VT) {
      self.instance_values.each do |name, value|
        xml.send("ap:#{name}", value)
      end
    }
  end      
  builder.to_xml
end