From cdfc7251bde8347678d355e5fe65fc20e120bc23 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 21:45:19 +0900 Subject: updating docs for 1.0.10a release --- doc/Axlsx/Workbook.html | 364 +++++++++++++++++++++++++++--------------------- 1 file changed, 208 insertions(+), 156 deletions(-) (limited to 'doc/Axlsx/Workbook.html') diff --git a/doc/Axlsx/Workbook.html b/doc/Axlsx/Workbook.html index 27c67ec0..db00aa41 100644 --- a/doc/Axlsx/Workbook.html +++ b/doc/Axlsx/Workbook.html @@ -94,31 +94,33 @@

Overview

- -

The Workbook class is an xlsx workbook that manages worksheets, charts, +

+The Workbook class is an xlsx workbook that manages worksheets, charts, drawings and styles. The following parts of the Office Open XML spreadsheet -specification are not implimented in this version.

- -
bookViews
-calcPr
-customWorkbookViews
-definedNames
-externalReferences
-extLst
-fileRecoveryPr
-fileSharing
-fileVersion
-functionGroups
-oleSize
-pivotCaches
-smartTagPr
-smartTagTypes
-webPublishing
-webPublishObjects
-workbookProtection
-workbookPr*
-
-*workbookPr is only supported to the extend of date1904
+specification are not implimented in this version. +

+
+  bookViews
+  calcPr
+  customWorkbookViews
+  definedNames
+  externalReferences
+  extLst
+  fileRecoveryPr
+  fileSharing
+  fileVersion
+  functionGroups
+  oleSize
+  pivotCaches
+  smartTagPr
+  smartTagTypes
+  webPublishing
+  webPublishObjects
+  workbookProtection
+  workbookPr*
+
+  *workbookPr is only supported to the extend of date1904
+
@@ -134,9 +136,10 @@ workbookPr*
@@date1904 =
- -

Indicates if the epoc date for serialization should be 1904. If false, 1900 -is used.

+

+Indicates if the epoc date for serialization should be 1904. If false, 1900 +is used. +

@@ -146,7 +149,8 @@ is used.

-
false
+
false
+
@@ -174,8 +178,9 @@ is used.

-
-

A colllection of charts associated with this workbook.

+

+A colllection of charts associated with this workbook. +

@@ -200,8 +205,9 @@ is used.

-
-

A colllection of drawings associated with this workbook.

+

+A colllection of drawings associated with this workbook. +

@@ -226,8 +232,9 @@ is used.

-
-

A colllection of images associated with this workbook.

+

+A colllection of images associated with this workbook. +

@@ -252,8 +259,9 @@ is used.

-
-

A collection of worksheets associated with this workbook.

+

+A collection of worksheets associated with this workbook. +

@@ -288,8 +296,9 @@ is used.

-
-

retrieves the date1904 attribute.

+

+retrieves the date1904 attribute. +

@@ -311,8 +320,9 @@ is used.

-
-

Sets the date1904 attribute to the provided boolean.

+

+Sets the date1904 attribute to the provided boolean. +

@@ -343,8 +353,9 @@ is used.

-
-

Adds a worksheet to this workbook.

+

+Adds a worksheet to this workbook. +

@@ -366,8 +377,9 @@ is used.

-
-

Instance level access to the class variable 1904.

+

+Instance level access to the class variable 1904. +

@@ -389,8 +401,9 @@ is used.

-
-

see @date1904.

+

+see @date1904. +

@@ -414,8 +427,9 @@ is used.

-
-

Creates a new Workbook.

+

+Creates a new Workbook. +

@@ -437,8 +451,9 @@ is used.

-
-

The workbook relationships.

+

+The workbook relationships. +

@@ -460,8 +475,9 @@ is used.

-
-

The styles associated with this workbook.

+

+The styles associated with this workbook. +

@@ -483,8 +499,9 @@ is used.

-
-

Serializes the workbook document.

+

+Serializes the workbook document. +

@@ -505,8 +522,9 @@ is used.

- -

Creates a new Workbook

+

+Creates a new Workbook +

@@ -527,8 +545,9 @@ is used.

— -
-

a customizable set of options

+

+a customizable set of options +

@@ -579,8 +598,9 @@ is used.

— -
-

the object that the method was called on

+

+the object that the method was called on +

@@ -606,15 +626,16 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 77
 
-def initialize(options={})
-  @styles = Styles.new
-  @worksheets = SimpleTypedList.new Worksheet
-  @drawings = SimpleTypedList.new Drawing
-  @charts = SimpleTypedList.new Chart
-  @images = SimpleTypedList.new Pic
-  self.date1904= options[:date1904] unless options[:date1904].nil?
-  yield self if block_given?      
-end
+def initialize(options={}) + @styles = Styles.new + @worksheets = SimpleTypedList.new Worksheet + @drawings = SimpleTypedList.new Drawing + @charts = SimpleTypedList.new Chart + @images = SimpleTypedList.new Pic + self.date1904= options[:date1904] unless options[:date1904].nil? + yield self if block_given? +end + @@ -640,13 +661,15 @@ is used.

Note: -
-

The recommended way to manage charts is Worksheet#add_chart

+

+The recommended way to manage charts is Worksheet#add_chart +

- -

A colllection of charts associated with this workbook

+

+A colllection of charts associated with this workbook +

@@ -689,9 +712,10 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 45
 
-def charts
-  @charts
-end
+def charts + @charts +end + @@ -712,13 +736,15 @@ is used.

Note: -
-

The recommended way to manage drawings is Worksheet#add_chart

+

+The recommended way to manage drawings is Worksheet#add_chart +

- -

A colllection of drawings associated with this workbook

+

+A colllection of drawings associated with this workbook +

@@ -761,9 +787,10 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 59
 
-def drawings
-  @drawings
-end
+def drawings + @drawings +end + @@ -784,13 +811,15 @@ is used.

Note: -
-

The recommended way to manage images is Worksheet#add_image

+

+The recommended way to manage images is Worksheet#add_image +

- -

A colllection of images associated with this workbook

+

+A colllection of images associated with this workbook +

@@ -833,9 +862,10 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 52
 
-def images
-  @images
-end
+def images + @images +end + @@ -856,13 +886,15 @@ is used.

Note: -
-

The recommended way to manage worksheets is add_worksheet

+

+The recommended way to manage worksheets is add_worksheet +

- -

A collection of worksheets associated with this workbook.

+

+A collection of worksheets associated with this workbook. +

@@ -905,9 +937,10 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 38
 
-def worksheets
-  @worksheets
-end
+def worksheets + @worksheets +end + @@ -929,8 +962,9 @@ is used.

- -

retrieves the date1904 attribute

+

+retrieves the date1904 attribute +

@@ -962,7 +996,8 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 100
 
-def self.date1904() @@date1904; end
+def self.date1904() @@date1904; end + @@ -977,8 +1012,9 @@ is used.

- -

Sets the date1904 attribute to the provided boolean

+

+Sets the date1904 attribute to the provided boolean +

@@ -1010,7 +1046,8 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 96
 
-def self.date1904=(v) Axlsx::validate_boolean v; @@date1904 = v; end
+def self.date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end + @@ -1031,8 +1068,9 @@ is used.

- -

Adds a worksheet to this workbook

+

+Adds a worksheet to this workbook +

@@ -1053,8 +1091,9 @@ is used.

— -
-

a customizable set of options

+

+a customizable set of options +

@@ -1073,8 +1112,9 @@ is used.

- —
-

The name of the worksheet.

+ —

+The name of the worksheet. +

@@ -1130,11 +1170,12 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 106
 
-def add_worksheet(options={})
-  worksheet = Worksheet.new(self, options)
-  yield worksheet if block_given?
-  worksheet
-end
+def add_worksheet(options={}) + worksheet = Worksheet.new(self, options) + yield worksheet if block_given? + worksheet +end + @@ -1149,8 +1190,9 @@ is used.

- -

Instance level access to the class variable 1904

+

+Instance level access to the class variable 1904 +

@@ -1182,7 +1224,8 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 89
 
-def date1904() @@date1904; end
+def date1904() @@date1904; end + @@ -1197,8 +1240,9 @@ is used.

- -

see @date1904

+

+see @date1904 +

@@ -1217,7 +1261,8 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 92
 
-def date1904=(v) Axlsx::validate_boolean v; @@date1904 = v; end
+def date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end + @@ -1232,8 +1277,9 @@ is used.

- -

The workbook relationships. This is managed automatically by the workbook

+

+The workbook relationships. This is managed automatically by the workbook +

@@ -1272,14 +1318,15 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 114
 
-def relationships
-  r = Relationships.new
-  @worksheets.each do |sheet|
-    r << Relationship.new(WORKSHEET_R, WORKSHEET_PN % (r.size+1))
-  end 
-  r << Relationship.new(STYLES_R,  STYLES_PN)
-  r
-end
+def relationships + r = Relationships.new + @worksheets.each do |sheet| + r << Relationship.new(WORKSHEET_R, WORKSHEET_PN % (r.size+1)) + end + r << Relationship.new(STYLES_R, STYLES_PN) + r +end + @@ -1297,13 +1344,15 @@ is used.

Note: -
-

The recommended way to manage styles is Styles#add_style

+

+The recommended way to manage styles is Styles#add_style +

- -

The styles associated with this workbook

+

+The styles associated with this workbook +

@@ -1360,10 +1409,11 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 66
 
-def styles
-  yield @styles if block_given?
-  @styles
-end
+def styles + yield @styles if block_given? + @styles +end + @@ -1378,8 +1428,9 @@ is used.

- -

Serializes the workbook document

+

+Serializes the workbook document +

@@ -1424,20 +1475,21 @@ is used.

# File 'lib/axlsx/workbook/workbook.rb', line 125
 
-def to_xml()
-  add_worksheet unless worksheets.size > 0
-  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
-    xml.workbook(:xmlns => XML_NS, :xmlns:r' => XML_NS_R) {
-      xml.workbookPr(:date1904=>@@date1904)
-      xml.sheets {
-        @worksheets.each_with_index do |sheet, index|              
-          xml.sheet(:name=>sheet.name, :sheetId=>index+1, :r:id"=>sheet.rId)
-        end
-      }
-    }
-  end      
-  builder.to_xml(:indent=>0)
-end
+def to_xml() + add_worksheet unless worksheets.size > 0 + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.workbook(:xmlns => XML_NS, :'xmlns:r' => XML_NS_R) { + xml.workbookPr(:date1904=>@@date1904) + xml.sheets { + @worksheets.each_with_index do |sheet, index| + xml.sheet(:name=>sheet.name, :sheetId=>index+1, :"r:id"=>sheet.rId) + end + } + } + end + builder.to_xml(:indent=>0) +end + @@ -1448,9 +1500,9 @@ is used.

-- cgit v1.2.3