mindreframer-oxcelix 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +7 -0
- data/.yardopts +3 -0
- data/CHANGES +33 -0
- data/Gemfile +4 -0
- data/History.md +12 -0
- data/LICENSE +20 -0
- data/README.md +82 -0
- data/README.rdoc +70 -0
- data/Rakefile +8 -0
- data/lib/oxcelix.rb +24 -0
- data/lib/oxcelix/cell.rb +22 -0
- data/lib/oxcelix/cellhelper.rb +49 -0
- data/lib/oxcelix/core_ext/ext.rb +26 -0
- data/lib/oxcelix/nf.rb +172 -0
- data/lib/oxcelix/numformats.rb +115 -0
- data/lib/oxcelix/sax/comments.rb +28 -0
- data/lib/oxcelix/sax/sharedstrings.rb +17 -0
- data/lib/oxcelix/sax/styles.rb +49 -0
- data/lib/oxcelix/sax/xlsheet.rb +136 -0
- data/lib/oxcelix/sheet.rb +97 -0
- data/lib/oxcelix/version.rb +3 -0
- data/lib/oxcelix/workbook.rb +396 -0
- data/oxcelix.gemspec +28 -0
- data/spec/cell_spec.rb +13 -0
- data/spec/fixnum_spec.rb +11 -0
- data/spec/fixtures/shared_strings.xml +12 -0
- data/spec/fixtures/test.xlsx +0 -0
- data/spec/matrix_spec.rb +11 -0
- data/spec/oxcelix_spec.rb +31 -0
- data/spec/sax/shared_strings_spec.rb +20 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/string_spec.rb +21 -0
- metadata +172 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d887dedb26e98af8ff1d0031a8221c7b6aaef750
|
4
|
+
data.tar.gz: 418f7d499fda13b0e760d1e735234a68ae8f2a4a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f547e5c1b110c4f2905e94fe5f7e1ad4cccaa71d8469515a3b03ef9195edc2f484d5e610802f86080610efa9a2c3c2ed4c06b7332853f434478963e98665d81d
|
7
|
+
data.tar.gz: ca9b27d036d2a986606fb946ae899c87a57e3e0dd125d8041ea2cdc549e61074354ba96f1ad2c579d16f5f04c7267dfcd8374ebee43f73a3320e787392adc183
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/CHANGES
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
0.4.0
|
2
|
+
* Code refactoring - Workbook creation is now more fine-grained.
|
3
|
+
* Speedups: case statements replaced some complex and reoccurring
|
4
|
+
'if' structures in the SAX-parsers. This can cause 2-15% speedups depending
|
5
|
+
on the input file size.
|
6
|
+
* New parser options: Cell range or "page" (:cellrange, :pagination)
|
7
|
+
selection is possible for memory saving (while preserving parsing speed too)
|
8
|
+
* New workbook classes: RuWorkBook, ValueWorkbook, RawValueWorkbook
|
9
|
+
* System temp directory is uses for unpacking.
|
10
|
+
|
11
|
+
0.3.3
|
12
|
+
* Will not terminate it a directory called 'tmp' already exists in the current directory.
|
13
|
+
Thanks to bhavinkamani for pointing this out.
|
14
|
+
* Corrected type in xlsheet parser: empty cells near to non-empty ones will now be correctly handled
|
15
|
+
|
16
|
+
0.3.2
|
17
|
+
* The numeric method in numformats will now try to gsub the correct format value and not the format index.
|
18
|
+
* Required rubyzip version number is now >=1.1.0. 0.9.9 which was apparently
|
19
|
+
enough did not load - thanks to Fredrik Persen Fostvedt for spotting that out.
|
20
|
+
* Clarification added to the readme: Thanks again to Fredrik!
|
21
|
+
|
22
|
+
0.3.1
|
23
|
+
* Sheet now has its very own to_ru and to_fmt methods. Also a to_m method has been added, which returns a Matrix of raw data.
|
24
|
+
* Documentation changes.
|
25
|
+
0.3.0
|
26
|
+
* Number formats edition that includes:
|
27
|
+
Cell#to_ru and Cell#to_fmt.
|
28
|
+
Numberformats module
|
29
|
+
Numberhelper module
|
30
|
+
0.2.4
|
31
|
+
* Bugfix release
|
32
|
+
0.2.2
|
33
|
+
* Sheet < Matrix
|
data/Gemfile
ADDED
data/History.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
n.n.n / 2013-10-09
|
3
|
+
==================
|
4
|
+
|
5
|
+
* Update workbook.rb
|
6
|
+
* Changed another instance of Ox::load_file, as it won't work under windows
|
7
|
+
|
8
|
+
n.n.n / 2013-10-09
|
9
|
+
==================
|
10
|
+
|
11
|
+
* Update workbook.rb
|
12
|
+
* Changed another instance of Ox::load_file, as it won't work under windows
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 gbiczo
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
Oxcelix
|
2
|
+
=======
|
3
|
+
<a href="http://badge.fury.io/rb/oxcelix"><img src="https://badge.fury.io/rb/oxcelix.svg" alt="Gem Version" height="18"></a>
|
4
|
+
[![Build Status](https://travis-ci.org/gbiczo/oxcelix.svg?branch=0.4.0)](https://travis-ci.org/gbiczo/oxcelix)
|
5
|
+
|
6
|
+
Oxcelix - A fast and simple .xlsx file parser
|
7
|
+
|
8
|
+
Description
|
9
|
+
-----------
|
10
|
+
|
11
|
+
Oxcelix is an xlsx (Excel 2007/2010) parser. The result of the parsing is a
|
12
|
+
Workbook which is an array of Sheet objects, which in turn store the data in
|
13
|
+
Matrix objects. Matrices consist of Cell objects to maintain comments and
|
14
|
+
formatting/style data
|
15
|
+
|
16
|
+
Oxcelix uses the great Ox gem (http://rubygems.org/gems/ox) for fast SAX-parsing.
|
17
|
+
|
18
|
+
Synopsis
|
19
|
+
--------
|
20
|
+
|
21
|
+
To process an xlsx file:
|
22
|
+
|
23
|
+
require 'oxcelix'
|
24
|
+
w = Oxcelix::Workbook.new('whatever.xlsx')
|
25
|
+
|
26
|
+
To omit certain sheets:
|
27
|
+
|
28
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :exclude => ['sheet1', 'sheet2'])
|
29
|
+
|
30
|
+
Include only some of the sheets:
|
31
|
+
|
32
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :include => ['sheet1', 'sheet2', 'sheet3'])
|
33
|
+
|
34
|
+
To have the values of the merged cells copied over the mergegroup:
|
35
|
+
|
36
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :copymerge => true)
|
37
|
+
|
38
|
+
Convert a Sheet object into a collection of ruby values or formatted ruby strings:
|
39
|
+
|
40
|
+
require 'oxcelix'
|
41
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :copymerge => true)
|
42
|
+
w.sheets[0].to_ru # returns a Matrix of DateTime, Integer, etc objects
|
43
|
+
w.sheets[0].to_fmt # returns a Matrix of formatted Strings based on the above.
|
44
|
+
|
45
|
+
OR:
|
46
|
+
|
47
|
+
require 'oxcelix'
|
48
|
+
w = Oxcelix::RuValueWorkbook.new('whatever.xlsx', :copymerge => true)
|
49
|
+
w = Oxcelix::FormattedWorkbook.new('whatever.xlsx', :copymerge => true)
|
50
|
+
|
51
|
+
You can parse an Excel file partially to save memory:
|
52
|
+
|
53
|
+
require 'oxcelix'
|
54
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :cellrange => ('A3'..'R42')) # will only parse the cells included in the given range on every included sheet
|
55
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :paginate => [5,2]) # will only parse the second five-row group of every included sheet.
|
56
|
+
|
57
|
+
Installation
|
58
|
+
------------
|
59
|
+
|
60
|
+
gem install oxcelix
|
61
|
+
|
62
|
+
|
63
|
+
Advantages over other Excel parsers
|
64
|
+
-----------------------------------
|
65
|
+
|
66
|
+
Excel file processing involves XML document parsing. Usually, this is achieved by DOM-parsing the data with a suitable XML library.
|
67
|
+
|
68
|
+
The main drawbacks of this approach are memory usage and speed. The resulting object tree will be roughly as big as the original file, and during the parsing, they will both be stored in the memory, which can cause quite some complications when processing huge files. Also, interpreting every bit of an excel spreadsheet will slow down unnecessarily the process, if we only need the data stored in that file.
|
69
|
+
|
70
|
+
The solution for the memory-consumption problem is SAX stream parsing. This ensures that only the relevant XML elements get processed,
|
71
|
+
without having to load the whole XML file in memory.
|
72
|
+
|
73
|
+
Oxcelix uses the SAX parser offered by Peter Ohler's Ox gem. I found Ox SAX parser quite fast, so to further speed up the parsing.
|
74
|
+
|
75
|
+
For a comparison of XML parsers, please consult the Ox homepage[http://www.ohler.com/dev/xml_with_ruby/xml_with_ruby.html].
|
76
|
+
|
77
|
+
|
78
|
+
TODO
|
79
|
+
----
|
80
|
+
* include/exclude mechanism should extend to cell areas inside Sheet objects
|
81
|
+
* Further improvement to the formatting algorithms. Theoretically, to_fmt should be able to
|
82
|
+
split conditional-formatting strings and to display e.g. thousands separated number strings
|
data/README.rdoc
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
= \Oxcelix - A fast .xlsx file parser
|
2
|
+
|
3
|
+
{<img src="https://badge.fury.io/rb/oxcelix.png" alt="Gem Version" />}[http://badge.fury.io/rb/oxcelix]
|
4
|
+
{<img src="https://travis-ci.org/gbiczo/oxcelix.svg?branch=0.4.0" alt="Build Status" />}[https://travis-ci.org/gbiczo/oxcelix]
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Oxcelix is an xlsx (Excel 2007/2010) parser. The result of the parsing is a
|
8
|
+
Workbook which is an array of Sheet objects, which in turn store the data in
|
9
|
+
Matrix objects. Matrices consist of Cell objects to maintain comments and
|
10
|
+
formatting/style data.
|
11
|
+
|
12
|
+
Oxcelix uses the great Ox gem (http://rubygems.org/gems/ox) for fast SAX-parsing.
|
13
|
+
|
14
|
+
== Synopsis
|
15
|
+
|
16
|
+
To process an xlsx file:
|
17
|
+
|
18
|
+
require 'oxcelix'
|
19
|
+
|
20
|
+
w = Oxcelix::Workbook.new('whatever.xlsx')
|
21
|
+
|
22
|
+
To omit certain sheets to be processed:
|
23
|
+
|
24
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :exclude => ['sheet1', 'sheet2'])
|
25
|
+
|
26
|
+
Include only some of the sheets:
|
27
|
+
|
28
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :include => ['sheet1', 'sheet2', 'sheet3'])
|
29
|
+
|
30
|
+
To have the values of the merged cells copied over the mergegroup:
|
31
|
+
|
32
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :copymerge => true)
|
33
|
+
|
34
|
+
Convert a Sheet object into a collection of ruby values or formatted ruby strings:
|
35
|
+
|
36
|
+
require 'oxcelix'
|
37
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :copymerge => true)
|
38
|
+
w.sheets[0].to_ru # returns a Matrix of DateTime, Integer, etc objects
|
39
|
+
w.sheets[0].to_fmt # returns a Matrix of formatted Strings based on the above.
|
40
|
+
OR:
|
41
|
+
require 'oxcelix'
|
42
|
+
w = Oxcelix::RuValueWorkbook.new('whatever.xlsx', :copymerge => true)
|
43
|
+
w = Oxcelix::FormattedWorkbook.new('whatever.xlsx', :copymerge => true)
|
44
|
+
|
45
|
+
You can parse an Excel file partially to save memory:
|
46
|
+
require 'oxcelix'
|
47
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :cellrange => ('A3'..'R42')) # will only parse the cells included in the given range on every included sheet
|
48
|
+
w = Oxcelix::Workbook.new('whatever.xlsx', :paginate => [5,2]) # will only parse the second five-row group of every included sheet.
|
49
|
+
|
50
|
+
== Installation
|
51
|
+
|
52
|
+
gem install oxcelix
|
53
|
+
|
54
|
+
== Advantages over other Excel parsers
|
55
|
+
|
56
|
+
Excel file processing involves XML document parsing. Usually, this is achieved by DOM-parsing the data with a suitable XML library.
|
57
|
+
|
58
|
+
The main drawbacks of this approach are memory usage and speed. The resulting object tree will be roughly as big as the original file, and during the parsing, they will both be stored in the memory, which can cause quite some complications when processing huge files. Also, interpreting every bit of an excel spreadsheet will slow down unnecessarily the process, if we only need the data stored in that file.
|
59
|
+
|
60
|
+
The solution for the memory-consumption problem is SAX stream parsing. This ensures that only the relevant XML elements get processed,
|
61
|
+
without having to load the whole XML file in memory.
|
62
|
+
|
63
|
+
Oxcelix uses the SAX parser offered by Peter Ohler's Ox gem. I found Ox SAX parser quite fast, so to further speed up the parsing.
|
64
|
+
|
65
|
+
For a comparison of XML parsers, please consult the Ox homepage[http://www.ohler.com/dev/xml_with_ruby/xml_with_ruby.html].
|
66
|
+
|
67
|
+
== TODO
|
68
|
+
* include/exclude mechanism should extend to cell areas inside Sheet objects
|
69
|
+
* Further improvement to the formatting algorithms. Theoretically, to_fmt should be able to
|
70
|
+
split conditional-formatting strings and to display e.g. thousands separated number strings
|
data/Rakefile
ADDED
data/lib/oxcelix.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'ox'
|
2
|
+
require 'find'
|
3
|
+
require 'matrix'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'tmpdir'
|
6
|
+
require 'zip'
|
7
|
+
require 'oxcelix/version'
|
8
|
+
require 'oxcelix/cellhelper'
|
9
|
+
require 'oxcelix/numformats'
|
10
|
+
require 'oxcelix/nf'
|
11
|
+
require 'oxcelix/cell'
|
12
|
+
require 'oxcelix/sheet'
|
13
|
+
require 'oxcelix/workbook'
|
14
|
+
require 'oxcelix/sax/sharedstrings'
|
15
|
+
require 'oxcelix/sax/comments'
|
16
|
+
require 'oxcelix/sax/xlsheet'
|
17
|
+
require 'oxcelix/sax/styles'
|
18
|
+
require 'oxcelix/core_ext/ext'
|
19
|
+
|
20
|
+
|
21
|
+
# The namespace Oxcelix.
|
22
|
+
module Oxcelix
|
23
|
+
|
24
|
+
end
|
data/lib/oxcelix/cell.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Oxcelix
|
2
|
+
# Simple class representing an excel cell.
|
3
|
+
# @!attribute [rw] xlcoords
|
4
|
+
# @return [String] The Excel-style coordinates of the cell object
|
5
|
+
# @!attribute [rw] type
|
6
|
+
# @return [String] Cell content type
|
7
|
+
# @!attribute [rw] value
|
8
|
+
# @return [String] the type of the cell
|
9
|
+
# @!attribute [rw] comment
|
10
|
+
# @return [String] Comment text
|
11
|
+
# @!attribute [rw] style
|
12
|
+
# @return [String] Excel style attribute
|
13
|
+
# @!attribute [rw] numformat
|
14
|
+
# @return [String] Excel style number formatting
|
15
|
+
|
16
|
+
class Cell
|
17
|
+
attr_accessor :xlcoords, :type, :value, :comment, :style, :numformat
|
18
|
+
include Cellhelper
|
19
|
+
include Cellvalues
|
20
|
+
include Numberhelper
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Oxcelix
|
2
|
+
|
3
|
+
# The Cellvalues module provides methods for setting cell values. They are named after the relevant XML entitiesd and
|
4
|
+
# called directly by the Xlsheet SAX parser.
|
5
|
+
module Cellvalues
|
6
|
+
# Set the excel cell name (eg: 'A2')
|
7
|
+
# @param [String] val Excel cell address name
|
8
|
+
def r(val); @xlcoords = val; end;
|
9
|
+
# Set cell type
|
10
|
+
def t(val); @type = val; end;
|
11
|
+
# Set cell value
|
12
|
+
def v(val); @value = val; end;
|
13
|
+
# Set cell style (number format and style)
|
14
|
+
def s(val); @style = val; end;
|
15
|
+
end
|
16
|
+
|
17
|
+
# The Cellhelper module defines some methods useful to manipulate Cell objects
|
18
|
+
module Cellhelper
|
19
|
+
# When called without parameters, returns the x coordinate of the calling cell object based on the value of #@xlcoords
|
20
|
+
# If a parameter is given, #x will return the x coordinate corresponding to the parameter
|
21
|
+
# @example find x coordinate (column number) of a cell
|
22
|
+
# c = Cell.new
|
23
|
+
# c.xlcoords = ('B3')
|
24
|
+
# c.x #=> 1
|
25
|
+
# @param [String] coord Optional parameter used when method is not called from a Cell object
|
26
|
+
# @return [Integer] x coordinate
|
27
|
+
def x(coord=nil)
|
28
|
+
if coord.nil?
|
29
|
+
coord = @xlcoords
|
30
|
+
end
|
31
|
+
('A'..(coord.scan(/\p{Alpha}+|\p{Digit}+/u)[0])).to_a.length-1
|
32
|
+
end
|
33
|
+
|
34
|
+
# When called without parameters, returns the y coordinate of the calling cell object based on the value of #@xlcoords
|
35
|
+
# If a parameter is given, #y will return the y coordinate corresponding to the parameter
|
36
|
+
# @example find y coordinate (row number) of a cell
|
37
|
+
# c = Cell.new
|
38
|
+
# c.xlcoords = ('B3')
|
39
|
+
# c.y #=> 2
|
40
|
+
# @param [String] coord Optional parameter used when method is not called from a Cell object
|
41
|
+
# @return [Integer] x coordinate
|
42
|
+
def y(coord=nil)
|
43
|
+
if coord.nil?
|
44
|
+
coord = @xlcoords
|
45
|
+
end
|
46
|
+
coord.scan(/\p{Alpha}+|\p{Digit}+/u)[1].to_i-1
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class String
|
2
|
+
# Returns true if the given String represents a numeric value
|
3
|
+
# @return [Bool] true if the string represents a numeric value, false if it doesn't.
|
4
|
+
def numeric?
|
5
|
+
Float(self) != nil rescue false
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class Matrix
|
10
|
+
# Set the cell value i,j to x, where i=row, and j=column.
|
11
|
+
# @param i [Integer] Row
|
12
|
+
# @param j [Integer] Column
|
13
|
+
# @param x [Object] New cell value
|
14
|
+
def []=(i, j, x)
|
15
|
+
@rows[i][j]=x
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class Fixnum
|
20
|
+
# Returns the column name corresponding to the given number. e.g: 1.col_name => 'B'
|
21
|
+
# @return [String]
|
22
|
+
def col_name
|
23
|
+
val = self/26
|
24
|
+
(val > 0 ? (val - 1).col_name : "") + (self % 26 + 65).chr
|
25
|
+
end
|
26
|
+
end
|
data/lib/oxcelix/nf.rb
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
module Oxcelix
|
2
|
+
module Numformats
|
3
|
+
# Formatarray is the array of default format strings in Excel. Nil values should apparently contain CJK date format strings,
|
4
|
+
#feel free to add/document those according to existing standards.
|
5
|
+
Formatarray = [
|
6
|
+
{:id => '0', :xl => 'General', :ostring => nil, :cls => 'string'},
|
7
|
+
{:id => '1', :xl => '0', :ostring => '%1d', :cls => 'numeric'},
|
8
|
+
{:id => '2', :xl => '0.00', :ostring => '%1.2f', :cls => 'numeric'},
|
9
|
+
{:id => '3', :xl => '#,##0', :ostring => '%#4d', :cls => 'numeric'},
|
10
|
+
{:id => '4', :xl => '#,##0.00', :ostring => '%#4.2f', :cls => 'numeric'},
|
11
|
+
{:id => '5', :xl => '', :ostring => nil, :cls => 'string'},
|
12
|
+
{:id => '6', :xl => '', :ostring => nil, :cls => 'string'},
|
13
|
+
{:id => '7', :xl => '', :ostring => nil, :cls => 'string'},
|
14
|
+
{:id => '8', :xl => '', :ostring => nil, :cls => 'string'},
|
15
|
+
{:id => '9', :xl => '0%', :ostring => '%1d%', :cls => 'numeric'},
|
16
|
+
{:id => '10', :xl => '0.00%', :ostring => '%1.2f%', :cls => 'numeric'},
|
17
|
+
{:id => '11', :xl => '0.00E+00', :ostring => '%1.2fE+', :cls => 'numeric'},
|
18
|
+
{:id => '12', :xl => '# ?/?', :ostring => '%#1d', :cls => 'rational'},
|
19
|
+
{:id => '13', :xl => '# ??/??', :ostring => '%#1d', :cls => 'rational'},
|
20
|
+
{:id => '14', :xl => 'd/m/yyyy', :ostring => '%-d/%-m/%Y', :cls => 'date'},
|
21
|
+
{:id => '15', :xl => 'd-mmm-yy', :ostring => '%-d-%b-%y', :cls => 'date'},
|
22
|
+
{:id => '16', :xl => 'd-mmm', :ostring => '%-d-%b', :cls => 'date'},
|
23
|
+
{:id => '17', :xl => 'mmm-yy', :ostring => '%b-%y', :cls => 'date'},
|
24
|
+
{:id => '18', :xl => 'h:mm tt', :ostring => '%-k:%M tt', :cls => 'date'},
|
25
|
+
{:id => '19', :xl => 'h:mm:ss tt', :ostring => '%-k:%M:%-S tt', :cls => 'date'},
|
26
|
+
{:id => '20', :xl => 'H:mm', :ostring => '%-k:%M', :cls => 'date'},
|
27
|
+
{:id => '21', :xl => 'H:mm:ss', :ostring => '%-k:%M:%-S', :cls => 'date'},
|
28
|
+
{:id => '22', :xl => 'm/d/yyyy H:mm', :ostring => '%-m/%-d/%Y %-k:%M', :cls => 'date'},
|
29
|
+
{:id => '23', :xl => '', :ostring => nil, :cls => 'string'},
|
30
|
+
{:id => '24', :xl => '', :ostring => nil, :cls => 'string'},
|
31
|
+
{:id => '25', :xl => '', :ostring => nil, :cls => 'string'},
|
32
|
+
{:id => '26', :xl => '', :ostring => nil, :cls => 'string'},
|
33
|
+
{:id => '27', :xl => '', :ostring => nil, :cls => 'string'},
|
34
|
+
{:id => '28', :xl => '', :ostring => nil, :cls => 'string'},
|
35
|
+
{:id => '29', :xl => '', :ostring => nil, :cls => 'string'},
|
36
|
+
{:id => '30', :xl => '', :ostring => nil, :cls => 'string'},
|
37
|
+
{:id => '31', :xl => '', :ostring => nil, :cls => 'string'},
|
38
|
+
{:id => '32', :xl => '', :ostring => nil, :cls => 'string'},
|
39
|
+
{:id => '33', :xl => '', :ostring => nil, :cls => 'string'},
|
40
|
+
{:id => '34', :xl => '', :ostring => nil, :cls => 'string'},
|
41
|
+
{:id => '35', :xl => '', :ostring => nil, :cls => 'string'},
|
42
|
+
{:id => '36', :xl => '', :ostring => nil, :cls => 'string'},
|
43
|
+
{:id => '37', :xl => '#,##0 ;(#,##0)', :ostring => '%#4d', :cls => 'numeric'},
|
44
|
+
{:id => '38', :xl => '#,##0 ;[Red](#,##0)', :ostring => '%#4d', :cls => 'numeric'},
|
45
|
+
{:id => '39', :xl => '#,##0.00;(#,##0.00)', :ostring => '%#4.2f', :cls => 'numeric'},
|
46
|
+
{:id => '40', :xl => '#,##0.00;[Red](#,##0.00)', :ostring => '%#4.2f', :cls => 'numeric'},
|
47
|
+
{:id => '41', :xl => '', :ostring => nil, :cls => 'string'},
|
48
|
+
{:id => '42', :xl => '', :ostring => nil, :cls => 'string'},
|
49
|
+
{:id => '43', :xl => '', :ostring => nil, :cls => 'string'},
|
50
|
+
{:id => '44', :xl => '', :ostring => nil, :cls => 'string'},
|
51
|
+
{:id => '45', :xl => 'mm:ss', :ostring => '%M:%-S', :cls => 'date'},
|
52
|
+
{:id => '46', :xl => '[h]:mm:ss', :ostring => '%-k:%M:%-S', :cls => 'date'},
|
53
|
+
{:id => '47', :xl => 'mmss.0', :ostring => '%M%-S.%1n', :cls => 'date'},
|
54
|
+
{:id => '48', :xl => '##0.0E+0', :ostring => '%#3.1E', :cls => 'numeric'},
|
55
|
+
{:id => '49', :xl => '@,', :ostring => '@%d', :cls => 'numeric'},
|
56
|
+
{:id => '50', :xl => '', :ostring => nil, :cls => 'string'},
|
57
|
+
{:id => '51', :xl => '', :ostring => nil, :cls => 'string'},
|
58
|
+
{:id => '52', :xl => '', :ostring => nil, :cls => 'string'},
|
59
|
+
{:id => '53', :xl => '', :ostring => nil, :cls => 'string'},
|
60
|
+
{:id => '54', :xl => '', :ostring => nil, :cls => 'string'},
|
61
|
+
{:id => '55', :xl => '', :ostring => nil, :cls => 'string'},
|
62
|
+
{:id => '56', :xl => '', :ostring => nil, :cls => 'string'},
|
63
|
+
{:id => '57', :xl => '', :ostring => nil, :cls => 'string'},
|
64
|
+
{:id => '58', :xl => '', :ostring => nil, :cls => 'string'},
|
65
|
+
{:id => '59', :xl => '', :ostring => nil, :cls => 'string'},
|
66
|
+
{:id => '60', :xl => '', :ostring => nil, :cls => 'string'},
|
67
|
+
{:id => '61', :xl => '', :ostring => nil, :cls => 'string'},
|
68
|
+
{:id => '62', :xl => '', :ostring => nil, :cls => 'string'},
|
69
|
+
{:id => '63', :xl => '', :ostring => nil, :cls => 'string'},
|
70
|
+
{:id => '64', :xl => '', :ostring => nil, :cls => 'string'},
|
71
|
+
{:id => '65', :xl => '', :ostring => nil, :cls => 'string'},
|
72
|
+
{:id => '66', :xl => '', :ostring => nil, :cls => 'string'},
|
73
|
+
{:id => '67', :xl => '', :ostring => nil, :cls => 'string'},
|
74
|
+
{:id => '68', :xl => '', :ostring => nil, :cls => 'string'},
|
75
|
+
{:id => '69', :xl => '', :ostring => nil, :cls => 'string'},
|
76
|
+
{:id => '70', :xl => '', :ostring => nil, :cls => 'string'},
|
77
|
+
{:id => '71', :xl => '', :ostring => nil, :cls => 'string'},
|
78
|
+
{:id => '72', :xl => '', :ostring => nil, :cls => 'string'},
|
79
|
+
{:id => '73', :xl => '', :ostring => nil, :cls => 'string'},
|
80
|
+
{:id => '74', :xl => '', :ostring => nil, :cls => 'string'},
|
81
|
+
{:id => '75', :xl => '', :ostring => nil, :cls => 'string'},
|
82
|
+
{:id => '76', :xl => '', :ostring => nil, :cls => 'string'},
|
83
|
+
{:id => '77', :xl => '', :ostring => nil, :cls => 'string'},
|
84
|
+
{:id => '78', :xl => '', :ostring => nil, :cls => 'string'},
|
85
|
+
{:id => '79', :xl => '', :ostring => nil, :cls => 'string'},
|
86
|
+
{:id => '80', :xl => '', :ostring => nil, :cls => 'string'},
|
87
|
+
{:id => '81', :xl => '', :ostring => nil, :cls => 'string'},
|
88
|
+
{:id => '82', :xl => '', :ostring => nil, :cls => 'string'},
|
89
|
+
{:id => '83', :xl => '', :ostring => nil, :cls => 'string'},
|
90
|
+
{:id => '84', :xl => '', :ostring => nil, :cls => 'string'},
|
91
|
+
{:id => '85', :xl => '', :ostring => nil, :cls => 'string'},
|
92
|
+
{:id => '86', :xl => '', :ostring => nil, :cls => 'string'},
|
93
|
+
{:id => '87', :xl => '', :ostring => nil, :cls => 'string'},
|
94
|
+
{:id => '88', :xl => '', :ostring => nil, :cls => 'string'},
|
95
|
+
{:id => '89', :xl => '', :ostring => nil, :cls => 'string'},
|
96
|
+
{:id => '90', :xl => '', :ostring => nil, :cls => 'string'},
|
97
|
+
{:id => '91', :xl => '', :ostring => nil, :cls => 'string'},
|
98
|
+
{:id => '92', :xl => '', :ostring => nil, :cls => 'string'},
|
99
|
+
{:id => '93', :xl => '', :ostring => nil, :cls => 'string'},
|
100
|
+
{:id => '94', :xl => '', :ostring => nil, :cls => 'string'},
|
101
|
+
{:id => '95', :xl => '', :ostring => nil, :cls => 'string'},
|
102
|
+
{:id => '96', :xl => '', :ostring => nil, :cls => 'string'},
|
103
|
+
{:id => '97', :xl => '', :ostring => nil, :cls => 'string'},
|
104
|
+
{:id => '98', :xl => '', :ostring => nil, :cls => 'string'},
|
105
|
+
{:id => '99', :xl => '', :ostring => nil, :cls => 'string'},
|
106
|
+
{:id => '100', :xl => '', :ostring => nil, :cls => 'string'},
|
107
|
+
{:id => '101', :xl => '', :ostring => nil, :cls => 'string'},
|
108
|
+
{:id => '102', :xl => '', :ostring => nil, :cls => 'string'},
|
109
|
+
{:id => '103', :xl => '', :ostring => nil, :cls => 'string'},
|
110
|
+
{:id => '104', :xl => '', :ostring => nil, :cls => 'string'},
|
111
|
+
{:id => '105', :xl => '', :ostring => nil, :cls => 'string'},
|
112
|
+
{:id => '106', :xl => '', :ostring => nil, :cls => 'string'},
|
113
|
+
{:id => '107', :xl => '', :ostring => nil, :cls => 'string'},
|
114
|
+
{:id => '108', :xl => '', :ostring => nil, :cls => 'string'},
|
115
|
+
{:id => '109', :xl => '', :ostring => nil, :cls => 'string'},
|
116
|
+
{:id => '110', :xl => '', :ostring => nil, :cls => 'string'},
|
117
|
+
{:id => '111', :xl => '', :ostring => nil, :cls => 'string'},
|
118
|
+
{:id => '112', :xl => '', :ostring => nil, :cls => 'string'},
|
119
|
+
{:id => '113', :xl => '', :ostring => nil, :cls => 'string'},
|
120
|
+
{:id => '114', :xl => '', :ostring => nil, :cls => 'string'},
|
121
|
+
{:id => '115', :xl => '', :ostring => nil, :cls => 'string'},
|
122
|
+
{:id => '116', :xl => '', :ostring => nil, :cls => 'string'},
|
123
|
+
{:id => '117', :xl => '', :ostring => nil, :cls => 'string'},
|
124
|
+
{:id => '118', :xl => '', :ostring => nil, :cls => 'string'},
|
125
|
+
{:id => '119', :xl => '', :ostring => nil, :cls => 'string'},
|
126
|
+
{:id => '120', :xl => '', :ostring => nil, :cls => 'string'},
|
127
|
+
{:id => '121', :xl => '', :ostring => nil, :cls => 'string'},
|
128
|
+
{:id => '122', :xl => '', :ostring => nil, :cls => 'string'},
|
129
|
+
{:id => '123', :xl => '', :ostring => nil, :cls => 'string'},
|
130
|
+
{:id => '124', :xl => '', :ostring => nil, :cls => 'string'},
|
131
|
+
{:id => '125', :xl => '', :ostring => nil, :cls => 'string'},
|
132
|
+
{:id => '126', :xl => '', :ostring => nil, :cls => 'string'},
|
133
|
+
{:id => '127', :xl => '', :ostring => nil, :cls => 'string'},
|
134
|
+
{:id => '128', :xl => '', :ostring => nil, :cls => 'string'},
|
135
|
+
{:id => '129', :xl => '', :ostring => nil, :cls => 'string'},
|
136
|
+
{:id => '130', :xl => '', :ostring => nil, :cls => 'string'},
|
137
|
+
{:id => '131', :xl => '', :ostring => nil, :cls => 'string'},
|
138
|
+
{:id => '132', :xl => '', :ostring => nil, :cls => 'string'},
|
139
|
+
{:id => '133', :xl => '', :ostring => nil, :cls => 'string'},
|
140
|
+
{:id => '134', :xl => '', :ostring => nil, :cls => 'string'},
|
141
|
+
{:id => '135', :xl => '', :ostring => nil, :cls => 'string'},
|
142
|
+
{:id => '136', :xl => '', :ostring => nil, :cls => 'string'},
|
143
|
+
{:id => '137', :xl => '', :ostring => nil, :cls => 'string'},
|
144
|
+
{:id => '138', :xl => '', :ostring => nil, :cls => 'string'},
|
145
|
+
{:id => '139', :xl => '', :ostring => nil, :cls => 'string'},
|
146
|
+
{:id => '140', :xl => '', :ostring => nil, :cls => 'string'},
|
147
|
+
{:id => '141', :xl => '', :ostring => nil, :cls => 'string'},
|
148
|
+
{:id => '142', :xl => '', :ostring => nil, :cls => 'string'},
|
149
|
+
{:id => '143', :xl => '', :ostring => nil, :cls => 'string'},
|
150
|
+
{:id => '144', :xl => '', :ostring => nil, :cls => 'string'},
|
151
|
+
{:id => '145', :xl => '', :ostring => nil, :cls => 'string'},
|
152
|
+
{:id => '146', :xl => '', :ostring => nil, :cls => 'string'},
|
153
|
+
{:id => '147', :xl => '', :ostring => nil, :cls => 'string'},
|
154
|
+
{:id => '148', :xl => '', :ostring => nil, :cls => 'string'},
|
155
|
+
{:id => '149', :xl => '', :ostring => nil, :cls => 'string'},
|
156
|
+
{:id => '150', :xl => '', :ostring => nil, :cls => 'string'},
|
157
|
+
{:id => '151', :xl => '', :ostring => nil, :cls => 'string'},
|
158
|
+
{:id => '152', :xl => '', :ostring => nil, :cls => 'string'},
|
159
|
+
{:id => '153', :xl => '', :ostring => nil, :cls => 'string'},
|
160
|
+
{:id => '154', :xl => '', :ostring => nil, :cls => 'string'},
|
161
|
+
{:id => '155', :xl => '', :ostring => nil, :cls => 'string'},
|
162
|
+
{:id => '156', :xl => '', :ostring => nil, :cls => 'string'},
|
163
|
+
{:id => '157', :xl => '', :ostring => nil, :cls => 'string'},
|
164
|
+
{:id => '158', :xl => '', :ostring => nil, :cls => 'string'},
|
165
|
+
{:id => '159', :xl => '', :ostring => nil, :cls => 'string'},
|
166
|
+
{:id => '160', :xl => '', :ostring => nil, :cls => 'string'},
|
167
|
+
{:id => '161', :xl => '', :ostring => nil, :cls => 'string'},
|
168
|
+
{:id => '162', :xl => '', :ostring => nil, :cls => 'string'},
|
169
|
+
{:id => '163', :xl => '', :ostring => nil, :cls => 'string'},
|
170
|
+
]
|
171
|
+
end
|
172
|
+
end
|