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/NumFmt.html | 179 ++++++++++++++++++++++---------------------------- 1 file changed, 80 insertions(+), 99 deletions(-) (limited to 'doc/Axlsx/NumFmt.html') diff --git a/doc/Axlsx/NumFmt.html b/doc/Axlsx/NumFmt.html index 8dd0ac81..173c94aa 100644 --- a/doc/Axlsx/NumFmt.html +++ b/doc/Axlsx/NumFmt.html @@ -97,16 +97,14 @@
Note: -

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

+
+

The recommended way to manage styles is Styles#add_style

-

-A NumFmt object defines an identifier and formatting code for data in -cells. -

+ +

A NumFmt object defines an identifier and formatting code for data in +cells.

@@ -138,9 +136,8 @@ cells. -

-The formatting to use for this number format. -

+
+

The formatting to use for this number format.

@@ -165,9 +162,8 @@ The formatting to use for this number format. -

-An unsinged integer referencing a standard or custom number format. -

+
+

An unsinged integer referencing a standard or custom number format.

@@ -204,9 +200,8 @@ An unsinged integer referencing a standard or custom number format. -

-A new instance of NumFmt. -

+
+

A new instance of NumFmt.

@@ -228,10 +223,9 @@ A new instance of NumFmt. -

-Creates a numFmt element applying the instance values of this object as -attributes. -

+
+

Creates a numFmt element applying the instance values of this object as +attributes.

@@ -252,9 +246,8 @@ attributes.

-

-A new instance of NumFmt -

+ +

A new instance of NumFmt

@@ -279,14 +272,13 @@ A new instance of NumFmt
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 45
 
-def initialize(options={})
-  @numFmtId = 0
-  @formatCode = ""
-  options.each do |o|
-    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
-  end
-end
-
+def initialize(options={}) + @numFmtId = 0 + @formatCode = "" + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -309,9 +301,8 @@ A new instance of NumFmt

-

-The formatting to use for this number format. -

+ +

The formatting to use for this number format.

@@ -329,9 +320,8 @@ The formatting to use for this number format. — -

-The formatting to use for this number format. -

+
+

The formatting to use for this number format.

@@ -358,10 +348,9 @@ The formatting to use for this number format.
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 44
 
-def formatCode
-  @formatCode
-end
-
+def formatCode + @formatCode +end @@ -382,51 +371,48 @@ The formatting to use for this number format.
Note: -

-These are the known formats I can dig up. The constant NUM_FMT_PERCENT is +

+

These are the known formats I can dig up. The constant NUM_FMT_PERCENT is 9, and uses the default % formatting. Axlsx also defines a few formats for date and time that are commonly used in asia as NUM_FMT_YYYYMMDD and -NUM_FRM_YYYYMMDDHHMMSS. -

-
- 1 0
- 2 0.00
- 3 #,##0
- 4 #,##0.00
- 5 $#,##0_);($#,##0)
- 6 $#,##0_);[Red]($#,##0)
- 7 $#,##0.00_);($#,##0.00)
- 8 $#,##0.00_);[Red]($#,##0.00)
- 9 0%
- 10 0.00%
- 11 0.00E+00
- 12 # ?/?
- 13 # ??/??
- 14 m/d/yyyy
- 15 d-mmm-yy
- 16 d-mmm
- 17 mmm-yy
- 18 h:mm AM/PM
- 19 h:mm:ss AM/PM
- 20 h:mm
- 21 h:mm:ss
- 22 m/d/yyyy h:mm
- 37 #,##0_);(#,##0)
- 38 #,##0_);[Red](#,##0)
- 39 #,##0.00_);(#,##0.00)
- 40 #,##0.00_);[Red](#,##0.00)
- 45 mm:ss
- 46 [h]:mm:ss
- 47 mm:ss.0
- 48 ##0.0E+0
- 49 @
-
+NUM_FRM_YYYYMMDDHHMMSS.

+ +
1 0
+2 0.00
+3 #,##0
+4 #,##0.00
+5 $#,##0_);($#,##0)
+6 $#,##0_);[Red]($#,##0)
+7 $#,##0.00_);($#,##0.00)
+8 $#,##0.00_);[Red]($#,##0.00)
+9 0%
+10 0.00%
+11 0.00E+00
+12 # ?/?
+13 # ??/??
+14 m/d/yyyy
+15 d-mmm-yy
+16 d-mmm
+17 mmm-yy
+18 h:mm AM/PM
+19 h:mm:ss AM/PM
+20 h:mm
+21 h:mm:ss
+22 m/d/yyyy h:mm
+37 #,##0_);(#,##0)
+38 #,##0_);[Red](#,##0)
+39 #,##0.00_);(#,##0.00)
+40 #,##0.00_);[Red](#,##0.00)
+45 mm:ss
+46 [h]:mm:ss
+47 mm:ss.0
+48 ##0.0E+0
+49 @
-

-An unsinged integer referencing a standard or custom number format. -

+ +

An unsinged integer referencing a standard or custom number format.

@@ -444,9 +430,8 @@ An unsinged integer referencing a standard or custom number format. — -

-An unsinged integer referencing a standard or custom number format. -

+
+

An unsinged integer referencing a standard or custom number format.

@@ -473,10 +458,9 @@ An unsinged integer referencing a standard or custom number format.
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 40
 
-def numFmtId
-  @numFmtId
-end
-
+def numFmtId + @numFmtId +end @@ -498,10 +482,9 @@ An unsinged integer referencing a standard or custom number format.

-

-Creates a numFmt element applying the instance values of this object as -attributes. -

+ +

Creates a numFmt element applying the instance values of this object as +attributes.

@@ -520,9 +503,8 @@ attributes. — -

-The document builder instance this objects xml will be added to. -

+
+

The document builder instance this objects xml will be added to.

@@ -541,8 +523,7 @@ The document builder instance this objects xml will be added to.
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 60
 
-def to_xml(xml) xml.numFmt(self.instance_values) end
-
+def to_xml(xml) xml.numFmt(self.instance_values) end @@ -553,9 +534,9 @@ The document builder instance this objects xml will be added to.
-- cgit v1.2.3