From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- doc/Axlsx/Workbook.html | 364 +++++++++++++++++++++--------------------------- 1 file changed, 156 insertions(+), 208 deletions(-) (limited to 'doc/Axlsx/Workbook.html') diff --git a/doc/Axlsx/Workbook.html b/doc/Axlsx/Workbook.html index 764ec304..f614f82b 100644 --- a/doc/Axlsx/Workbook.html +++ b/doc/Axlsx/Workbook.html @@ -94,33 +94,31 @@

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
@@ -136,10 +134,9 @@ specification are not implimented in this version.
@@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.

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

-A colllection of charts associated with this workbook. -

+
+

A colllection of charts associated with this workbook.

@@ -205,9 +200,8 @@ A colllection of charts associated with this workbook. -

-A colllection of drawings associated with this workbook. -

+
+

A colllection of drawings associated with this workbook.

@@ -232,9 +226,8 @@ A colllection of drawings associated with this workbook. -

-A colllection of images associated with this workbook. -

+
+

A colllection of images associated with this workbook.

@@ -259,9 +252,8 @@ A colllection of images associated with this workbook. -

-A collection of worksheets associated with this workbook. -

+
+

A collection of worksheets associated with this workbook.

@@ -296,9 +288,8 @@ A collection of worksheets associated with this workbook. -

-retrieves the date1904 attribute. -

+
+

retrieves the date1904 attribute.

@@ -320,9 +311,8 @@ retrieves the date1904 attribute. -

-Sets the date1904 attribute to the provided boolean. -

+
+

Sets the date1904 attribute to the provided boolean.

@@ -353,9 +343,8 @@ Sets the date1904 attribute to the provided boolean. -

-Adds a worksheet to this workbook. -

+
+

Adds a worksheet to this workbook.

@@ -377,9 +366,8 @@ Adds a worksheet to this workbook. -

-Instance level access to the class variable 1904. -

+
+

Instance level access to the class variable 1904.

@@ -401,9 +389,8 @@ Instance level access to the class variable 1904. -

-see @date1904. -

+
+

see @date1904.

@@ -427,9 +414,8 @@ see @date1904. -

-Creates a new Workbook. -

+
+

Creates a new Workbook.

@@ -451,9 +437,8 @@ Creates a new Workbook. -

-The workbook relationships. -

+
+

The workbook relationships.

@@ -475,9 +460,8 @@ The workbook relationships. -

-The styles associated with this workbook. -

+
+

The styles associated with this workbook.

@@ -499,9 +483,8 @@ The styles associated with this workbook. -

-Serializes the workbook document. -

+
+

Serializes the workbook document.

@@ -522,9 +505,8 @@ Serializes the workbook document.

-

-Creates a new Workbook -

+ +

Creates a new Workbook

@@ -545,9 +527,8 @@ Creates a new Workbook — -

-a customizable set of options -

+
+

a customizable set of options

@@ -598,9 +579,8 @@ a customizable set of options — -

-the object that the method was called on -

+
+

the object that the method was called on

@@ -626,16 +606,15 @@ the object that the method was called on
# 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 @@ -661,15 +640,13 @@ the object that the method was called on
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

@@ -712,10 +689,9 @@ A colllection of charts associated with this workbook
# File 'lib/axlsx/workbook/workbook.rb', line 45
 
-def charts
-  @charts
-end
-
+def charts + @charts +end @@ -736,15 +712,13 @@ A colllection of charts associated with this workbook
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

@@ -787,10 +761,9 @@ A colllection of drawings associated with this workbook
# File 'lib/axlsx/workbook/workbook.rb', line 59
 
-def drawings
-  @drawings
-end
-
+def drawings + @drawings +end @@ -811,15 +784,13 @@ A colllection of drawings associated with this workbook
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

@@ -862,10 +833,9 @@ A colllection of images associated with this workbook
# File 'lib/axlsx/workbook/workbook.rb', line 52
 
-def images
-  @images
-end
-
+def images + @images +end @@ -886,15 +856,13 @@ A colllection of images associated with this workbook
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.

@@ -937,10 +905,9 @@ A collection of worksheets associated with this workbook.
# File 'lib/axlsx/workbook/workbook.rb', line 38
 
-def worksheets
-  @worksheets
-end
-
+def worksheets + @worksheets +end @@ -962,9 +929,8 @@ A collection of worksheets associated with this workbook.

-

-retrieves the date1904 attribute -

+ +

retrieves the date1904 attribute

@@ -996,8 +962,7 @@ retrieves the date1904 attribute
# File 'lib/axlsx/workbook/workbook.rb', line 100
 
-def self.date1904() @@date1904; end
-
+def self.date1904() @@date1904; end @@ -1012,9 +977,8 @@ retrieves the date1904 attribute

-

-Sets the date1904 attribute to the provided boolean -

+ +

Sets the date1904 attribute to the provided boolean

@@ -1046,8 +1010,7 @@ Sets the date1904 attribute to the provided boolean
# 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 @@ -1068,9 +1031,8 @@ Sets the date1904 attribute to the provided boolean

-

-Adds a worksheet to this workbook -

+ +

Adds a worksheet to this workbook

@@ -1091,9 +1053,8 @@ Adds a worksheet to this workbook — -

-a customizable set of options -

+
+

a customizable set of options

@@ -1112,9 +1073,8 @@ a customizable set of options - —

-The name of the worksheet. -

+ —
+

The name of the worksheet.

@@ -1170,12 +1130,11 @@ The name of the worksheet.
# 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 @@ -1190,9 +1149,8 @@ The name of the worksheet.

-

-Instance level access to the class variable 1904 -

+ +

Instance level access to the class variable 1904

@@ -1224,8 +1182,7 @@ Instance level access to the class variable 1904
# File 'lib/axlsx/workbook/workbook.rb', line 89
 
-def date1904() @@date1904; end
-
+def date1904() @@date1904; end @@ -1240,9 +1197,8 @@ Instance level access to the class variable 1904

-

-see @date1904 -

+ +

see @date1904

@@ -1261,8 +1217,7 @@ see @date1904
# 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 @@ -1277,9 +1232,8 @@ see @date1904

-

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

+ +

The workbook relationships. This is managed automatically by the workbook

@@ -1318,15 +1272,14 @@ The workbook relationships. This is managed automatically by the workbook
# 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 @@ -1344,15 +1297,13 @@ The workbook relationships. This is managed automatically by the workbook
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

@@ -1409,11 +1360,10 @@ The styles associated with this workbook
# 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 @@ -1428,9 +1378,8 @@ The styles associated with this workbook

-

-Serializes the workbook document -

+ +

Serializes the workbook document

@@ -1475,21 +1424,20 @@ Serializes the workbook document
# 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 @@ -1500,9 +1448,9 @@ Serializes the workbook document
-- cgit v1.2.3