workbook 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/.yardoc/checksums +18 -0
  2. data/.yardoc/object_types +3 -0
  3. data/.yardoc/objects/root.dat +0 -0
  4. data/.yardoc/proxy_types +0 -0
  5. data/Gemfile.lock +1 -1
  6. data/{readme.markdown → README.md} +36 -10
  7. data/doc/RubyXL.html +128 -0
  8. data/doc/RubyXL/Cell.html +202 -0
  9. data/doc/RubyXL/Workbook.html +447 -0
  10. data/doc/Workbook.html +130 -0
  11. data/doc/Workbook/Book.html +1484 -0
  12. data/doc/Workbook/Cell.html +1402 -0
  13. data/doc/Workbook/Format.html +654 -0
  14. data/doc/Workbook/Modules.html +117 -0
  15. data/doc/Workbook/Modules/RawObjectsStorage.html +508 -0
  16. data/doc/Workbook/Modules/TableDiffSort.html +620 -0
  17. data/doc/Workbook/Modules/TypeParser.html +1012 -0
  18. data/doc/Workbook/Readers.html +117 -0
  19. data/doc/Workbook/Readers/CsvReader.html +262 -0
  20. data/doc/Workbook/Readers/TxtReader.html +238 -0
  21. data/doc/Workbook/Readers/XlsReader.html +362 -0
  22. data/doc/Workbook/Readers/XlsShared.html +189 -0
  23. data/doc/Workbook/Readers/XlsxReader.html +295 -0
  24. data/doc/Workbook/Row.html +1939 -0
  25. data/doc/Workbook/Sheet.html +528 -0
  26. data/doc/Workbook/Table.html +883 -0
  27. data/doc/Workbook/Template.html +639 -0
  28. data/doc/Workbook/Writers.html +117 -0
  29. data/doc/Workbook/Writers/CsvTableWriter.html +175 -0
  30. data/doc/Workbook/Writers/XlsWriter.html +865 -0
  31. data/doc/_index.html +336 -0
  32. data/doc/class_list.html +53 -0
  33. data/doc/css/common.css +1 -0
  34. data/doc/css/full_list.css +57 -0
  35. data/doc/css/style.css +328 -0
  36. data/doc/file.README.html +236 -0
  37. data/doc/file_list.html +55 -0
  38. data/doc/frames.html +28 -0
  39. data/doc/index.html +236 -0
  40. data/doc/js/app.js +214 -0
  41. data/doc/js/full_list.js +173 -0
  42. data/doc/js/jquery.js +4 -0
  43. data/doc/method_list.html +972 -0
  44. data/doc/top-level-namespace.html +112 -0
  45. data/lib/workbook/book.rb +38 -29
  46. data/lib/workbook/cell.rb +25 -0
  47. data/lib/workbook/format.rb +9 -2
  48. data/lib/workbook/modules/raw_objects_storage.rb +5 -0
  49. data/lib/workbook/modules/table_diff_sort.rb +8 -6
  50. data/lib/workbook/modules/type_parser.rb +16 -3
  51. data/lib/workbook/readers/xls_reader.rb +1 -70
  52. data/lib/workbook/readers/xls_shared.rb +75 -0
  53. data/lib/workbook/row.rb +89 -17
  54. data/lib/workbook/sheet.rb +26 -0
  55. data/lib/workbook/table.rb +20 -1
  56. data/lib/workbook/template.rb +12 -11
  57. data/lib/workbook/writers/xls_writer.rb +19 -77
  58. data/test/test_modules_table_diff_sort.rb +19 -6
  59. data/test/test_row.rb +54 -0
  60. data/test/test_sheet.rb +8 -0
  61. data/test/test_table.rb +22 -3
  62. data/test/test_writers_xls_writer.rb +3 -0
  63. data/workbook.gemspec +1 -1
  64. metadata +46 -3
data/.yardoc/checksums ADDED
@@ -0,0 +1,18 @@
1
+ lib/workbook/writers/csv_table_writer.rb 59960db98b1dfa1c822ee07318a3ea43d3a18c02
2
+ lib/workbook/readers/csv_reader.rb d45517de402a2f91b2dd35a2b8cccaf0d4c4ac46
3
+ lib/workbook/sheet.rb 2eef7d56b2b591e4932672be7d1d8f80f9d1b58f
4
+ lib/workbook/book.rb f9c53cfc23e4ef3de7842fc21a68eabf3fce114e
5
+ lib/workbook/modules/type_parser.rb 7bd2c76768cab16aac57a204f71eb0c55dda8ffe
6
+ lib/workbook/readers/xlsx_reader.rb 97bc722295a11a3a26104584472de20b057157d8
7
+ lib/workbook/modules/raw_objects_storage.rb c2cc44050b5755f8599889001b2f6555aac1b5fe
8
+ lib/workbook/modules/table_diff_sort.rb 30796d7f9021e1a7a0aa61df0038bbf52b33db53
9
+ lib/workbook/readers/xls_reader.rb d36311c46dbb3339aa24c03d215304e21ce7720c
10
+ lib/workbook/table.rb dd8b32d0c1c551a5ff6c7331b359ddeee17b9ab2
11
+ lib/workbook.rb cb53e0c0575196b450523f561e06bf2fda7fd191
12
+ lib/workbook/readers/xls_shared.rb b8427b327b05348f35b900f909a06edbd0489bd1
13
+ lib/workbook/format.rb 62db46582528598a7450d8388a7cf59e44bf9fa6
14
+ lib/workbook/readers/txt_reader.rb 3dd1717b1c78bce56b3fbcd5031df39e89500b58
15
+ lib/workbook/row.rb f231132f5f04cafc723f3e71d73ab4a21d8e4882
16
+ lib/workbook/template.rb 07ed854dbb8c4a67e2d6ccc57a5046744769b0d3
17
+ lib/workbook/writers/xls_writer.rb ec6af9d65a1fe0424cfcc94b1ed9fd4764c7e273
18
+ lib/workbook/cell.rb ba456f14d20d47cba05e1ae616c075a3ec585aae
@@ -0,0 +1,3 @@
1
+ {
2
+ :
3
+ class["Workbook::Row"Workbook::Cell"Workbook::Book"Workbook::Sheet"Workbook::Table"Workbook::Format"Workbook::Template"RubyXL::Workbook"RubyXL::Cell: method[}"Workbook::Row#format="Workbook::Row#format"Workbook::Row#initialize"Workbook::Row#placeholder?"Workbook::Row#table"Workbook::Row#set_table"Workbook::Row#table="Workbook::Row#[]"Workbook::Row#[]="1Workbook::Row#find_cells_by_background_color"Workbook::Row#header?"Workbook::Row#first?"Workbook::Row#to_symbols"Workbook::Row#to_a"$Workbook::Row#table_header_keys"Workbook::Row#to_hash"Workbook::Row#<=>"Workbook::Row#key"Workbook::Row#compact"Workbook::Row#clone"Workbook::Cell#value="Workbook::Cell#value"Workbook::Cell#format="Workbook::Cell#format"Workbook::Cell#formula="Workbook::Cell#formula" Workbook::Cell#valid_value?"Workbook::Cell#initialize"Workbook::Cell#=="Workbook::Cell#nil?"Workbook::Cell#to_sym"Workbook::Cell#<=>"$Workbook::Cell#compare_on_class"'Workbook::Cell#importance_of_class"Workbook::Cell#inspect"Workbook::Cell#to_s"Workbook::Book#title="Workbook::Book#title"Workbook::Book#template="Workbook::Book#template"Workbook::Book#initialize"Workbook::Book#push"Workbook::Book#sheet"!Workbook::Book#has_contents?"Workbook::Book#open"Workbook::Book#open_binary"Workbook::Book#open_text""Workbook::Book#file_extension"Workbook::Book.open"+Workbook::Book#create_or_open_sheet_at"Workbook::Sheet#book="Workbook::Sheet#book"Workbook::Sheet#initialize""Workbook::Sheet#has_contents?"Workbook::Sheet#table"Workbook::Table#sheet="Workbook::Table#sheet"Workbook::Table#header="Workbook::Table#header"Workbook::Table#initialize"Workbook::Table#new_row"*Workbook::Table#create_or_open_row_at"(Workbook::Table#remove_empty_lines!"Workbook::Table#push"Workbook::Table#<<""Workbook::Table#has_contents?""Workbook::Table#contains_row?" Workbook::Format#merge_hash"Workbook::Format#name="Workbook::Format#name" Workbook::Format#initialize"+Workbook::Format#has_background_color?"Workbook::Format#to_css"Workbook::Format#merge""Workbook::Template#initialize"#Workbook::Template#has_header?""Workbook::Template#add_format"Workbook::Template#formats"0Workbook::Template#create_or_find_format_by"*Workbook::Readers::TxtReader#load_txt"+Workbook::Readers::TxtReader#parse_txt"*Workbook::Readers::CsvReader#load_csv"+Workbook::Readers::CsvReader#parse_csv"(Workbook::Writers::XlsWriter#to_xls"6Workbook::Writers::XlsWriter#format_to_xls_format"9Workbook::Writers::XlsWriter#html_color_to_xls_color"7Workbook::Writers::XlsWriter#strftime_to_ms_format".Workbook::Writers::XlsWriter#write_to_xls"+Workbook::Writers::XlsWriter#xls_sheet".Workbook::Writers::XlsWriter#xls_template";Workbook::Writers::XlsWriter#init_spreadsheet_template"*Workbook::Readers::XlsReader#load_xls"+Workbook::Readers::XlsReader#parse_xls"7Workbook::Readers::XlsReader#xls_color_to_html_hex";Workbook::Readers::XlsReader#ms_formatting_to_strftime"%RubyXL::Workbook#is_date_format?"$RubyXL::Workbook#num_fmts_by_id"RubyXL::Cell#number_format",Workbook::Readers::XlsxReader#load_xlsx"-Workbook::Readers::XlsxReader#parse_xlsx"<Workbook::Readers::XlsxReader#ms_formatting_to_strftime"2Workbook::Modules::TypeParser#strip_win_chars"1Workbook::Modules::TypeParser#string_parsers"2Workbook::Modules::TypeParser#string_parsers=":Workbook::Modules::TypeParser#string_parsers_as_procs"(Workbook::Modules::TypeParser#parse")Workbook::Modules::TypeParser#parse!")Workbook::Modules::TypeParser#clean!"1Workbook::Modules::TypeParser#string_cleaner"7Workbook::Modules::TypeParser#string_nil_converter";Workbook::Modules::TypeParser#string_integer_converter"CWorkbook::Modules::TypeParser#string_optimistic_date_converter";Workbook::Modules::TypeParser#string_boolean_converter"*Workbook::Modules::TableDiffSort#diff"3Workbook::Modules::TableDiffSort#diff_template"+Workbook::Modules::TableDiffSort#align"/Workbook::Modules::TableDiffSort#align_row"9Workbook::Modules::TableDiffSort#insert_placeholder?"5Workbook::Modules::TableDiffSort#placeholder_row"-Workbook::Writers::CsvTableWriter#to_csv"1Workbook::Modules::RawObjectsStorage#add_raw"6Workbook::Modules::RawObjectsStorage#has_raw_for?"8Workbook::Modules::RawObjectsStorage#return_raw_for":Workbook::Modules::RawObjectsStorage#remove_all_raws!".Workbook::Modules::RawObjectsStorage#raws: module["
Binary file
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workbook (0.2.0)
4
+ workbook (0.2.1)
5
5
  fastercsv
6
6
  rchardet (~> 1.3)
7
7
  rubyXL
@@ -1,6 +1,6 @@
1
1
  # Workbook
2
2
 
3
- Goal of this gem is to make working with workbooks (spreadsheets) as programmer friendly as possible. Not reinventing a totally new DSL or all kinds of new methodnames, but just borrowing from known concepts such as hashes and arrays (much like (Faster)CSV does)). Workbook is a gem that mimicks a typical spreadsheet, a bundle of sheets, bundled in a *workbook*. A sheet may contain one or more tables (which might the multi table sheets of Apple Numbers or Excel ranges). Basically:
3
+ Goal of this gem is to make working with workbooks (spreadsheets) as programmer friendly as possible. Not reinventing a totally new DSL or all kinds of new methodnames, but just borrowing from known concepts such as hashes and arrays (much like (Faster)CSV does)). Workbook is a gem that mimicks a typical spreadsheet, a bundle of sheets, bundled in a *workbook*. A sheet may contain one or more tables (which might the multi table sheets of Apple Numbers or Excel ranges). Basically:
4
4
 
5
5
  * Book
6
6
  * Sheet (one or more)
@@ -38,12 +38,38 @@ You can initialize with simple 2-d array like this:
38
38
  b = Workbook::Book.new [['a','b'],[1,2],[3,4],[5,6]]
39
39
  t = s.sheet.table
40
40
 
41
- Subsequently you lookup values in the table like this:
41
+ Subsequently you look up values in the table like this:
42
42
 
43
43
  t[1][:b]
44
44
  # returns <Workbook::Cel @value=2>
45
-
46
45
 
46
+ which is equivalent to
47
+
48
+ t[1][1]
49
+
50
+ Of course you'll be able to write a new value back to it. If you just enter a value, formatting of the original cell will be maintained.
51
+
52
+ t[1][:b] = 5
53
+
54
+ If you want to use an existing file as a template (which you can create in Excel to create nice looking templates),
55
+ simply clone the row, and add it back:
56
+
57
+ b = Workbook::Book.open("template.xls")
58
+ table = b.sheet.table
59
+ template_row = table[1] # can be any, but I typically have a well
60
+ # formatted header row + an example template
61
+ # row for the data
62
+ [1,2,3,4].each do |v|
63
+ new_row = template_row.clone
64
+ table << new_row # to use the symbol style header references,
65
+ # the row first needs to be added back to the
66
+ # table
67
+ new_row[:a] = v
68
+ end
69
+ table.delete(template_row) # you don't want the template to show up
70
+ # in the endresult
71
+ b.write("result.xls") # write it!
72
+
47
73
  <!-- Feature *to implement*:
48
74
 
49
75
  t['A2']
@@ -84,9 +110,9 @@ And a new book with a new sheet/table will be returned containing the difference
84
110
 
85
111
  Currently writing is limited to the following formats. Templating support is still limited.
86
112
 
87
- b.to_xls # returns a spreadsheet workbook
113
+ b.to_xls # returns a spreadsheet workbook
88
114
  b.write_to_xls filename # writes to filename
89
- t.to_csv # returns a csv-string (called on tables)
115
+ t.to_csv # returns a csv-string (called on tables)
90
116
 
91
117
  In case you want to display the table in HTML, some conversion is offered to convert text/background properties to css-entities. Internally the hash storing style elements tries to map to CSS where possible.
92
118
 
@@ -100,8 +126,8 @@ This code MIT (but see below) (c) murb / Maarten Brouwers, 2011-2013
100
126
 
101
127
  Workbook uses the following gems:
102
128
 
103
- * [Spreadsheet](https://github.com/zdavatz/spreadsheet) (Copyright (c) 2010 ywesee GmbH (mhatakeyama@ywesee.com, zdavatz@ywesee.com); GPL3 (License required for closed implementations))
104
- * [FasterCSV](http://fastercsv.rubyforge.org/) (Copyright (c) James Edward Gray II; GPL2 & Ruby License)
105
- * [rchardet](http://rubyforge.org/projects/rchardet) (Copyright (c) JMHodges; LGPL)
106
- * [ruby-ole](http://code.google.com/p/ruby-ole/) (Copyright (c) 2007-2010 Charles Lowe; MIT)
107
- * [RubyXL](https://github.com/gilt/rubyXL) (Copyright (c) 2011 Vivek Bhagwat; MIT-Licensed)
129
+ * [Spreadsheet](https://github.com/zdavatz/spreadsheet) Used for reading and writing old style .xls files (Copyright (c) 2010 ywesee GmbH (mhatakeyama@ywesee.com, zdavatz@ywesee.com); GPL3 (License required for closed implementations))
130
+ * [ruby-ole](http://code.google.com/p/ruby-ole/) Used in the Spreadsheet Gem (Copyright (c) 2007-2010 Charles Lowe; MIT)
131
+ * [FasterCSV](http://fastercsv.rubyforge.org/) Used for reading CSV (comma separated text) and TXT (tab separated text) files (Copyright (c) James Edward Gray II; GPL2 & Ruby License)
132
+ * [rchardet](http://rubyforge.org/projects/rchardet) Used for detecting encoding in CSV and TXT importers (Copyright (c) JMHodges; LGPL)
133
+ * [RubyXL](https://github.com/gilt/rubyXL) Used for reading the newer .xlsx files (Copyright (c) 2011 Vivek Bhagwat; MIT-Licensed)
data/doc/RubyXL.html ADDED
@@ -0,0 +1,128 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: RubyXL
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (R)</a> &raquo;
35
+
36
+
37
+ <span class="title">RubyXL</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: RubyXL
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/workbook/readers/xlsx_reader.rb<span class="defines">,<br />
83
+ lib/workbook/readers/xlsx_reader.rb,<br /> lib/workbook/readers/xlsx_reader.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+
92
+ <p>other monkey patch</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+
105
+
106
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="RubyXL/Cell.html" title="RubyXL::Cell (class)">Cell</a></span>, <span class='object_link'><a href="RubyXL/Workbook.html" title="RubyXL::Workbook (class)">Workbook</a></span>
107
+
108
+
109
+ </p>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ </div>
120
+
121
+ <div id="footer">
122
+ Generated on Thu Jan 17 13:15:57 2013 by
123
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
+ 0.8.3 (ruby-1.8.7).
125
+ </div>
126
+
127
+ </body>
128
+ </html>
@@ -0,0 +1,202 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: RubyXL::Cell
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../RubyXL.html" title="RubyXL (module)">RubyXL</a></span></span>
36
+ &raquo;
37
+ <span class="title">Cell</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: RubyXL::Cell
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">RubyXL::Cell</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/workbook/readers/xlsx_reader.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#number_format-instance_method" title="#number_format (instance method)">- (Object) <strong>number_format</strong> </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ </ul>
140
+
141
+
142
+
143
+
144
+ <div id="instance_method_details" class="method_details_list">
145
+ <h2>Instance Method Details</h2>
146
+
147
+
148
+ <div class="method_details first">
149
+ <h3 class="signature first" id="number_format-instance_method">
150
+
151
+ - (<tt>Object</tt>) <strong>number_format</strong>
152
+
153
+
154
+
155
+
156
+
157
+ </h3><table class="source_code">
158
+ <tr>
159
+ <td>
160
+ <pre class="lines">
161
+
162
+
163
+ 114
164
+ 115
165
+ 116
166
+ 117
167
+ 118
168
+ 119
169
+ 120
170
+ 121
171
+ 122</pre>
172
+ </td>
173
+ <td>
174
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 114</span>
175
+
176
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_number_format identifier id'>number_format</span>
177
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_@value ivar id'>@value</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_String constant id'>String</span><span class='rparen token'>)</span>
178
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_@workbook ivar id'>@workbook</span><span class='dot token'>.</span><span class='rubyid_num_fmts_by_id identifier id'>num_fmts_by_id</span>
179
+ <span class='rubyid_num_fmt_id identifier id'>num_fmt_id</span> <span class='assign token'>=</span> <span class='rubyid_xf_id identifier id'>xf_id</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='lbrack token'>[</span><span class='symbol val'>:numFmtId</span><span class='rbrack token'>]</span>
180
+ <span class='rubyid_tmp_num_fmt identifier id'>tmp_num_fmt</span> <span class='assign token'>=</span> <span class='rubyid_@workbook ivar id'>@workbook</span><span class='dot token'>.</span><span class='rubyid_num_fmts_by_id identifier id'>num_fmts_by_id</span><span class='lbrack token'>[</span><span class='rubyid_num_fmt_id identifier id'>num_fmt_id</span><span class='rbrack token'>]</span>
181
+ <span class='rubyid_return return kw'>return</span> <span class='lparen token'>(</span><span class='rubyid_tmp_num_fmt identifier id'>tmp_num_fmt</span> <span class='andop op'>&amp;&amp;</span><span class='rubyid_tmp_num_fmt identifier id'>tmp_num_fmt</span><span class='lbrack token'>[</span><span class='symbol val'>:attributes</span><span class='rbrack token'>]</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_tmp_num_fmt identifier id'>tmp_num_fmt</span><span class='lbrack token'>[</span><span class='symbol val'>:attributes</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='symbol val'>:formatCode</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_tmp_num_fmt identifier id'>tmp_num_fmt</span><span class='lbrack token'>[</span><span class='symbol val'>:attributes</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='symbol val'>:formatCode</span><span class='rbrack token'>]</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
182
+ <span class='rubyid_end end kw'>end</span>
183
+ <span class='rubyid_end end kw'>end</span>
184
+ <span class='rubyid_end end kw'>end</span>
185
+ </pre>
186
+ </td>
187
+ </tr>
188
+ </table>
189
+ </div>
190
+
191
+ </div>
192
+
193
+ </div>
194
+
195
+ <div id="footer">
196
+ Generated on Thu Jan 17 13:16:06 2013 by
197
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
198
+ 0.8.3 (ruby-1.8.7).
199
+ </div>
200
+
201
+ </body>
202
+ </html>
@@ -0,0 +1,447 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: RubyXL::Workbook
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (W)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../RubyXL.html" title="RubyXL (module)">RubyXL</a></span></span>
36
+ &raquo;
37
+ <span class="title">Workbook</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: RubyXL::Workbook
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">RubyXL::Workbook</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/workbook/readers/xlsx_reader.rb<span class="defines">,<br />
98
+ lib/workbook/readers/xlsx_reader.rb</span>
99
+ </dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>
113
+ Instance Method Summary
114
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
115
+ </h2>
116
+
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#is_date_format%3F-instance_method" title="#is_date_format? (instance method)">- (Boolean) <strong>is_date_format?</strong>(num_fmt) </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'></div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#num_fmts_by_id-instance_method" title="#num_fmts_by_id (instance method)">- (Object) <strong>num_fmts_by_id</strong> </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'></div></span>
159
+
160
+ </li>
161
+
162
+
163
+ </ul>
164
+
165
+
166
+
167
+
168
+ <div id="instance_method_details" class="method_details_list">
169
+ <h2>Instance Method Details</h2>
170
+
171
+
172
+ <div class="method_details first">
173
+ <h3 class="signature first" id="is_date_format?-instance_method">
174
+
175
+ - (<tt>Boolean</tt>) <strong>is_date_format?</strong>(num_fmt)
176
+
177
+
178
+
179
+
180
+
181
+ </h3><div class="docstring">
182
+ <div class="discussion">
183
+
184
+
185
+ </div>
186
+ </div>
187
+ <div class="tags">
188
+
189
+ <p class="tag_title">Returns:</p>
190
+ <ul class="return">
191
+
192
+ <li>
193
+
194
+
195
+ <span class='type'>(<tt>Boolean</tt>)</span>
196
+
197
+
198
+
199
+ </li>
200
+
201
+ </ul>
202
+
203
+ </div><table class="source_code">
204
+ <tr>
205
+ <td>
206
+ <pre class="lines">
207
+
208
+
209
+ 6
210
+ 7
211
+ 8
212
+ 9
213
+ 10
214
+ 11
215
+ 12
216
+ 13
217
+ 14
218
+ 15
219
+ 16
220
+ 17
221
+ 18
222
+ 19
223
+ 20
224
+ 21
225
+ 22
226
+ 23
227
+ 24
228
+ 25
229
+ 26
230
+ 27
231
+ 28
232
+ 29
233
+ 30
234
+ 31
235
+ 32
236
+ 33
237
+ 34
238
+ 35
239
+ 36
240
+ 37
241
+ 38
242
+ 39
243
+ 40
244
+ 41
245
+ 42
246
+ 43
247
+ 44
248
+ 45
249
+ 46
250
+ 47
251
+ 48
252
+ 49
253
+ 50
254
+ 51
255
+ 52
256
+ 53
257
+ 54
258
+ 55
259
+ 56
260
+ 57
261
+ 58
262
+ 59
263
+ 60
264
+ 61</pre>
265
+ </td>
266
+ <td>
267
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 6</span>
268
+
269
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_is_date_format? fid id'>is_date_format?</span><span class='lparen token'>(</span><span class='rubyid_num_fmt identifier id'>num_fmt</span><span class='rparen token'>)</span>
270
+ <span class='rubyid_num_fmt identifier id'>num_fmt</span><span class='dot token'>.</span><span class='rubyid_downcase! fid id'>downcase!</span>
271
+ <span class='rubyid_skip_chars identifier id'>skip_chars</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>'$'</span><span class='comma token'>,</span> <span class='string val'>'-'</span><span class='comma token'>,</span> <span class='string val'>'+'</span><span class='comma token'>,</span> <span class='string val'>'/'</span><span class='comma token'>,</span> <span class='string val'>'('</span><span class='comma token'>,</span> <span class='string val'>')'</span><span class='comma token'>,</span> <span class='string val'>':'</span><span class='comma token'>,</span> <span class='string val'>' '</span><span class='rbrack token'>]</span>
272
+ <span class='rubyid_num_chars identifier id'>num_chars</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>'0'</span><span class='comma token'>,</span> <span class='string val'>'#'</span><span class='comma token'>,</span> <span class='string val'>'?'</span><span class='rbrack token'>]</span>
273
+ <span class='rubyid_non_date_formats identifier id'>non_date_formats</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>'0.00e+00'</span><span class='comma token'>,</span> <span class='string val'>'##0.0e+0'</span><span class='comma token'>,</span> <span class='string val'>'general'</span><span class='comma token'>,</span> <span class='string val'>'@'</span><span class='rbrack token'>]</span>
274
+ <span class='rubyid_date_chars identifier id'>date_chars</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>'y'</span><span class='comma token'>,</span><span class='string val'>'m'</span><span class='comma token'>,</span><span class='string val'>'d'</span><span class='comma token'>,</span><span class='string val'>'h'</span><span class='comma token'>,</span><span class='string val'>'s'</span><span class='rbrack token'>]</span>
275
+
276
+ <span class='rubyid_state identifier id'>state</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
277
+ <span class='rubyid_s identifier id'>s</span> <span class='assign token'>=</span> <span class='string val'>''</span>
278
+ <span class='rubyid_num_fmt identifier id'>num_fmt</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='regexp val'>//</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span>
279
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_state identifier id'>state</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
280
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_c identifier id'>c</span> <span class='eq op'>==</span> <span class='string val'>'&quot;'</span>
281
+ <span class='rubyid_state identifier id'>state</span> <span class='assign token'>=</span> <span class='integer val'>1</span>
282
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='lbrack token'>[</span><span class='string val'>'\\'</span><span class='comma token'>,</span> <span class='string val'>'_'</span><span class='comma token'>,</span> <span class='string val'>'*'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
283
+ <span class='rubyid_state identifier id'>state</span> <span class='assign token'>=</span> <span class='integer val'>2</span>
284
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_skip_chars identifier id'>skip_chars</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
285
+ <span class='rubyid_next next kw'>next</span>
286
+ <span class='rubyid_else else kw'>else</span>
287
+ <span class='rubyid_s identifier id'>s</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_c identifier id'>c</span>
288
+ <span class='rubyid_end end kw'>end</span>
289
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_state identifier id'>state</span> <span class='eq op'>==</span> <span class='integer val'>1</span>
290
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_c identifier id'>c</span> <span class='eq op'>==</span> <span class='string val'>'&quot;'</span>
291
+ <span class='rubyid_state identifier id'>state</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
292
+ <span class='rubyid_end end kw'>end</span>
293
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_state identifier id'>state</span> <span class='eq op'>==</span> <span class='integer val'>2</span>
294
+ <span class='rubyid_state identifier id'>state</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
295
+ <span class='rubyid_end end kw'>end</span>
296
+ <span class='rubyid_end end kw'>end</span>
297
+ <span class='rubyid_s identifier id'>s</span><span class='dot token'>.</span><span class='rubyid_gsub! fid id'>gsub!</span><span class='lparen token'>(</span><span class='regexp val'>/\[[^\]]*\]/</span><span class='comma token'>,</span> <span class='string val'>''</span><span class='rparen token'>)</span>
298
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_non_date_formats identifier id'>non_date_formats</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_s identifier id'>s</span><span class='rparen token'>)</span>
299
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
300
+ <span class='rubyid_end end kw'>end</span>
301
+ <span class='rubyid_separator identifier id'>separator</span> <span class='assign token'>=</span> <span class='string val'>';'</span>
302
+ <span class='rubyid_got_sep identifier id'>got_sep</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
303
+ <span class='rubyid_date_count identifier id'>date_count</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
304
+ <span class='rubyid_num_count identifier id'>num_count</span> <span class='assign token'>=</span> <span class='integer val'>0</span>
305
+ <span class='rubyid_s identifier id'>s</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='regexp val'>//</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span>
306
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_date_chars identifier id'>date_chars</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
307
+ <span class='rubyid_date_count identifier id'>date_count</span> <span class='opasgn op'>+=</span> <span class='integer val'>1</span>
308
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_num_chars identifier id'>num_chars</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
309
+ <span class='rubyid_num_count identifier id'>num_count</span> <span class='opasgn op'>+=</span> <span class='integer val'>1</span>
310
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_c identifier id'>c</span> <span class='eq op'>==</span> <span class='rubyid_separator identifier id'>separator</span>
311
+ <span class='rubyid_got_sep identifier id'>got_sep</span> <span class='assign token'>=</span> <span class='integer val'>1</span>
312
+ <span class='rubyid_end end kw'>end</span>
313
+ <span class='rubyid_end end kw'>end</span>
314
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_date_count identifier id'>date_count</span> <span class='gt op'>&gt;</span> <span class='integer val'>0</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_num_count identifier id'>num_count</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
315
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_true true kw'>true</span>
316
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_num_count identifier id'>num_count</span> <span class='gt op'>&gt;</span> <span class='integer val'>0</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_date_count identifier id'>date_count</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
317
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
318
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_date_count identifier id'>date_count</span>
319
+ <span class='comment val'># ambiguous result</span>
320
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_got_sep identifier id'>got_sep</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
321
+ <span class='comment val'># constant result</span>
322
+ <span class='rubyid_end end kw'>end</span>
323
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_date_count identifier id'>date_count</span> <span class='gt op'>&gt;</span> <span class='rubyid_num_count identifier id'>num_count</span>
324
+ <span class='rubyid_end end kw'>end</span>
325
+ </pre>
326
+ </td>
327
+ </tr>
328
+ </table>
329
+ </div>
330
+
331
+ <div class="method_details ">
332
+ <h3 class="signature " id="num_fmts_by_id-instance_method">
333
+
334
+ - (<tt>Object</tt>) <strong>num_fmts_by_id</strong>
335
+
336
+
337
+
338
+
339
+
340
+ </h3><table class="source_code">
341
+ <tr>
342
+ <td>
343
+ <pre class="lines">
344
+
345
+
346
+ 68
347
+ 69
348
+ 70
349
+ 71
350
+ 72
351
+ 73
352
+ 74
353
+ 75
354
+ 76
355
+ 77
356
+ 78
357
+ 79
358
+ 80
359
+ 81
360
+ 82
361
+ 83
362
+ 84
363
+ 85
364
+ 86
365
+ 87
366
+ 88
367
+ 89
368
+ 90
369
+ 91
370
+ 92
371
+ 93
372
+ 94
373
+ 95
374
+ 96
375
+ 97
376
+ 98
377
+ 99
378
+ 100
379
+ 101
380
+ 102
381
+ 103
382
+ 104
383
+ 105
384
+ 106
385
+ 107</pre>
386
+ </td>
387
+ <td>
388
+ <pre class="code"><span class="info file"># File 'lib/workbook/readers/xlsx_reader.rb', line 68</span>
389
+
390
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_num_fmts_by_id identifier id'>num_fmts_by_id</span>
391
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_@num_fmts_hash ivar id'>@num_fmts_hash</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_@num_fmts_hash ivar id'>@num_fmts_hash</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
392
+ <span class='rubyid_@num_fmts_hash ivar id'>@num_fmts_hash</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='integer val'>1</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'0'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
393
+ <span class='integer val'>2</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'0.00'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
394
+ <span class='integer val'>3</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
395
+ <span class='integer val'>4</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0.00'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
396
+ <span class='integer val'>5</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'$#, ##0_);($#, ##0)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
397
+ <span class='integer val'>6</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'$#, ##0_);[Red]($#, ##0)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
398
+ <span class='integer val'>7</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'$#, ##0.00_);($#, ##0.00)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
399
+ <span class='integer val'>8</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'$#, ##0.00_);[Red]($#, ##0.00)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
400
+ <span class='integer val'>9</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'0%'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
401
+ <span class='integer val'>10</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'0.00%'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
402
+ <span class='integer val'>11</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'0.00E+00'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
403
+ <span class='integer val'>12</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'# ?/?'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
404
+ <span class='integer val'>13</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'# ??/??'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
405
+ <span class='integer val'>14</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'m/d/yyyy'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
406
+ <span class='integer val'>15</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'d-mmm-yy'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
407
+ <span class='integer val'>16</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'d-mmm'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
408
+ <span class='integer val'>17</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'mmm-yy'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
409
+ <span class='integer val'>18</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'h:mm AM/PM'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
410
+ <span class='integer val'>19</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'h:mm:ss AM/PM'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
411
+ <span class='integer val'>20</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'h:mm'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
412
+ <span class='integer val'>21</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'h:mm:ss'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
413
+ <span class='integer val'>22</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'m/d/yyyy h:mm'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
414
+ <span class='integer val'>37</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0_);(#, ##0)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
415
+ <span class='integer val'>38</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0_);[Red](#, ##0)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
416
+ <span class='integer val'>39</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0.00_);(#, ##0.00)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
417
+ <span class='integer val'>40</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'#, ##0.00_);[Red](#, ##0.00)'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
418
+ <span class='integer val'>45</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'mm:ss'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
419
+ <span class='integer val'>46</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'[h]:mm:ss'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
420
+ <span class='integer val'>47</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'mm:ss.0'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
421
+ <span class='integer val'>48</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'##0.0E+0'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='comma token'>,</span>
422
+ <span class='integer val'>49</span><span class='assign token'>=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:attributes=</span><span class='gt op'>&gt;</span><span class='lbrace token'>{</span><span class='symbol val'>:formatCode=</span><span class='gt op'>&gt;</span><span class='string val'>'@'</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span><span class='rbrace token'>}</span>
423
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_num_fmts identifier id'>num_fmts</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_num_fmts identifier id'>num_fmts</span><span class='lbrack token'>[</span><span class='symbol val'>:numFmt</span><span class='rbrack token'>]</span>
424
+ <span class='rubyid_num_fmts identifier id'>num_fmts</span><span class='lbrack token'>[</span><span class='symbol val'>:numFmt</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_num_fmt identifier id'>num_fmt</span><span class='bitor op'>|</span>
425
+ <span class='rubyid_@num_fmts_hash ivar id'>@num_fmts_hash</span><span class='lbrack token'>[</span><span class='rubyid_num_fmt identifier id'>num_fmt</span><span class='lbrack token'>[</span><span class='symbol val'>:attributes</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='symbol val'>:numFmtId</span><span class='rbrack token'>]</span><span class='rbrack token'>]</span><span class='assign token'>=</span><span class='rubyid_num_fmt identifier id'>num_fmt</span>
426
+ <span class='rubyid_end end kw'>end</span>
427
+ <span class='rubyid_end end kw'>end</span>
428
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_@num_fmts_hash ivar id'>@num_fmts_hash</span>
429
+ <span class='rubyid_end end kw'>end</span>
430
+ </pre>
431
+ </td>
432
+ </tr>
433
+ </table>
434
+ </div>
435
+
436
+ </div>
437
+
438
+ </div>
439
+
440
+ <div id="footer">
441
+ Generated on Thu Jan 17 13:16:06 2013 by
442
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
+ 0.8.3 (ruby-1.8.7).
444
+ </div>
445
+
446
+ </body>
447
+ </html>