rubyfromexcel 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. data/examples/checkpoints/checkpoint/checkpoint0.marshal +0 -0
  2. data/examples/checkpoints/checkpoint/checkpoint1.marshal +0 -0
  3. data/examples/checkpoints/checkpoint/checkpoint2.marshal +0 -0
  4. data/examples/checkpoints/checkpoint/checkpoint3.marshal +0 -0
  5. data/examples/checkpoints/checkpoint/checkpoint4.marshal +0 -0
  6. data/examples/checkpoints/checkpoint/checkpoint5.marshal +0 -0
  7. data/examples/ruby-versions/array-formulas-ruby/sheets/sheet1.rb +59 -0
  8. data/examples/ruby-versions/array-formulas-ruby/sheets/sheet2.rb +9 -0
  9. data/examples/ruby-versions/array-formulas-ruby/specs/sheet1_rspec.rb +156 -0
  10. data/examples/ruby-versions/array-formulas-ruby/specs/sheet2_rspec.rb +8 -0
  11. data/examples/ruby-versions/array-formulas-ruby/spreadsheet.rb +9 -0
  12. data/examples/ruby-versions/checkpoint-ruby/sheets/sheet1.rb +307 -0
  13. data/examples/ruby-versions/checkpoint-ruby/sheets/sheet2.rb +148 -0
  14. data/examples/ruby-versions/checkpoint-ruby/specs/sheet1_rspec.rb +884 -0
  15. data/examples/ruby-versions/checkpoint-ruby/specs/sheet2_rspec.rb +412 -0
  16. data/examples/ruby-versions/checkpoint-ruby/spreadsheet.rb +9 -0
  17. data/examples/ruby-versions/complex-test-ruby/sheets/sheet1.rb +305 -0
  18. data/examples/ruby-versions/complex-test-ruby/sheets/sheet2.rb +147 -0
  19. data/examples/ruby-versions/complex-test-ruby/specs/sheet1_rspec.rb +876 -0
  20. data/examples/ruby-versions/complex-test-ruby/specs/sheet2_rspec.rb +412 -0
  21. data/examples/ruby-versions/complex-test-ruby/spreadsheet.rb +9 -0
  22. data/examples/ruby-versions/namedReferenceTest-ruby/sheets/sheet1.rb +9 -0
  23. data/examples/ruby-versions/namedReferenceTest-ruby/sheets/sheet2.rb +8 -0
  24. data/examples/ruby-versions/namedReferenceTest-ruby/specs/sheet1_rspec.rb +16 -0
  25. data/examples/ruby-versions/namedReferenceTest-ruby/specs/sheet2_rspec.rb +16 -0
  26. data/examples/ruby-versions/namedReferenceTest-ruby/spreadsheet.rb +9 -0
  27. data/examples/ruby-versions/pruning-ruby/sheets/sheet1.rb +18 -0
  28. data/examples/ruby-versions/pruning-ruby/sheets/sheet2.rb +16 -0
  29. data/examples/ruby-versions/pruning-ruby/sheets/sheet3.rb +7 -0
  30. data/examples/ruby-versions/pruning-ruby/specs/sheet1_rspec.rb +28 -0
  31. data/examples/ruby-versions/pruning-ruby/specs/sheet2_rspec.rb +28 -0
  32. data/examples/ruby-versions/pruning-ruby/specs/sheet3_rspec.rb +8 -0
  33. data/examples/ruby-versions/pruning-ruby/spreadsheet.rb +9 -0
  34. data/examples/ruby-versions/sharedFormulaTest-ruby/sheets/sheet1.rb +15 -0
  35. data/examples/ruby-versions/sharedFormulaTest-ruby/specs/sheet1_rspec.rb +44 -0
  36. data/examples/ruby-versions/sharedFormulaTest-ruby/spreadsheet.rb +9 -0
  37. data/examples/ruby-versions/table-test-ruby/sheets/sheet1.rb +17 -0
  38. data/examples/ruby-versions/table-test-ruby/sheets/sheet2.rb +5 -0
  39. data/examples/ruby-versions/table-test-ruby/sheets/sheet3.rb +5 -0
  40. data/examples/ruby-versions/table-test-ruby/specs/sheet1_rspec.rb +20 -0
  41. data/examples/ruby-versions/table-test-ruby/specs/sheet2_rspec.rb +8 -0
  42. data/examples/ruby-versions/table-test-ruby/specs/sheet3_rspec.rb +8 -0
  43. data/examples/ruby-versions/table-test-ruby/spreadsheet.rb +9 -0
  44. data/examples/sheets/2050Model.xlsx +0 -0
  45. data/examples/unzipped-sheets/array-formulas/[Content_Types].xml +2 -0
  46. data/examples/unzipped-sheets/array-formulas/docProps/app.xml +2 -0
  47. data/examples/unzipped-sheets/array-formulas/docProps/core.xml +2 -0
  48. data/examples/unzipped-sheets/array-formulas/docProps/thumbnail.jpeg +0 -0
  49. data/examples/unzipped-sheets/array-formulas/xl/_rels/workbook.xml.rels +2 -0
  50. data/examples/unzipped-sheets/array-formulas/xl/calcChain.xml +2 -0
  51. data/examples/unzipped-sheets/array-formulas/xl/sharedStrings.xml +2 -0
  52. data/examples/unzipped-sheets/array-formulas/xl/styles.xml +2 -0
  53. data/examples/unzipped-sheets/array-formulas/xl/theme/theme1.xml +2 -0
  54. data/examples/unzipped-sheets/array-formulas/xl/workbook.xml +2 -0
  55. data/examples/unzipped-sheets/array-formulas/xl/worksheets/sheet1.xml +2 -0
  56. data/examples/unzipped-sheets/array-formulas/xl/worksheets/sheet2.xml +2 -0
  57. data/examples/unzipped-sheets/checkpoint/[Content_Types].xml +2 -0
  58. data/examples/unzipped-sheets/checkpoint/docProps/app.xml +2 -0
  59. data/examples/unzipped-sheets/checkpoint/docProps/core.xml +2 -0
  60. data/examples/unzipped-sheets/checkpoint/xl/_rels/workbook.xml.rels +2 -0
  61. data/examples/unzipped-sheets/checkpoint/xl/calcChain.xml +2 -0
  62. data/examples/unzipped-sheets/checkpoint/xl/charts/chart1.xml +2 -0
  63. data/examples/unzipped-sheets/checkpoint/xl/charts/chart2.xml +2 -0
  64. data/examples/unzipped-sheets/checkpoint/xl/comments1.xml +5 -0
  65. data/examples/unzipped-sheets/checkpoint/xl/comments2.xml +5 -0
  66. data/examples/unzipped-sheets/checkpoint/xl/drawings/_rels/drawing1.xml.rels +2 -0
  67. data/examples/unzipped-sheets/checkpoint/xl/drawings/_rels/drawing2.xml.rels +2 -0
  68. data/examples/unzipped-sheets/checkpoint/xl/drawings/drawing1.xml +2 -0
  69. data/examples/unzipped-sheets/checkpoint/xl/drawings/drawing2.xml +2 -0
  70. data/examples/unzipped-sheets/checkpoint/xl/drawings/vmlDrawing1.vml +47 -0
  71. data/examples/unzipped-sheets/checkpoint/xl/drawings/vmlDrawing2.vml +47 -0
  72. data/examples/unzipped-sheets/checkpoint/xl/sharedStrings.xml +2 -0
  73. data/examples/unzipped-sheets/checkpoint/xl/styles.xml +2 -0
  74. data/examples/unzipped-sheets/checkpoint/xl/theme/theme1.xml +2 -0
  75. data/examples/unzipped-sheets/checkpoint/xl/workbook.xml +2 -0
  76. data/examples/unzipped-sheets/checkpoint/xl/worksheets/_rels/sheet1.xml.rels +2 -0
  77. data/examples/unzipped-sheets/checkpoint/xl/worksheets/_rels/sheet2.xml.rels +2 -0
  78. data/examples/unzipped-sheets/checkpoint/xl/worksheets/sheet1.xml +2 -0
  79. data/examples/unzipped-sheets/checkpoint/xl/worksheets/sheet2.xml +2 -0
  80. data/examples/unzipped-sheets/complex-test/[Content_Types].xml +2 -0
  81. data/examples/unzipped-sheets/complex-test/docProps/app.xml +2 -0
  82. data/examples/unzipped-sheets/complex-test/docProps/core.xml +2 -0
  83. data/examples/unzipped-sheets/complex-test/xl/_rels/workbook.xml.rels +2 -0
  84. data/examples/unzipped-sheets/complex-test/xl/calcChain.xml +2 -0
  85. data/examples/unzipped-sheets/complex-test/xl/charts/chart1.xml +2 -0
  86. data/examples/unzipped-sheets/complex-test/xl/charts/chart2.xml +2 -0
  87. data/examples/unzipped-sheets/complex-test/xl/comments1.xml +5 -0
  88. data/examples/unzipped-sheets/complex-test/xl/comments2.xml +5 -0
  89. data/examples/unzipped-sheets/complex-test/xl/drawings/_rels/drawing1.xml.rels +2 -0
  90. data/examples/unzipped-sheets/complex-test/xl/drawings/_rels/drawing2.xml.rels +2 -0
  91. data/examples/unzipped-sheets/complex-test/xl/drawings/drawing1.xml +2 -0
  92. data/examples/unzipped-sheets/complex-test/xl/drawings/drawing2.xml +2 -0
  93. data/examples/unzipped-sheets/complex-test/xl/drawings/vmlDrawing1.vml +46 -0
  94. data/examples/unzipped-sheets/complex-test/xl/drawings/vmlDrawing2.vml +46 -0
  95. data/examples/unzipped-sheets/complex-test/xl/sharedStrings.xml +2 -0
  96. data/examples/unzipped-sheets/complex-test/xl/styles.xml +2 -0
  97. data/examples/unzipped-sheets/complex-test/xl/theme/theme1.xml +2 -0
  98. data/examples/unzipped-sheets/complex-test/xl/workbook.xml +2 -0
  99. data/examples/unzipped-sheets/complex-test/xl/worksheets/_rels/sheet1.xml.rels +2 -0
  100. data/examples/unzipped-sheets/complex-test/xl/worksheets/_rels/sheet2.xml.rels +2 -0
  101. data/examples/unzipped-sheets/complex-test/xl/worksheets/sheet1.xml +2 -0
  102. data/examples/unzipped-sheets/complex-test/xl/worksheets/sheet2.xml +2 -0
  103. data/examples/unzipped-sheets/complex-test/xl/worksheets/sheet3.xml +2 -0
  104. data/examples/unzipped-sheets/namedReferenceTest/[Content_Types].xml +2 -0
  105. data/examples/unzipped-sheets/namedReferenceTest/docProps/app.xml +2 -0
  106. data/examples/unzipped-sheets/namedReferenceTest/docProps/core.xml +2 -0
  107. data/examples/unzipped-sheets/namedReferenceTest/docProps/thumbnail.jpeg +0 -0
  108. data/examples/unzipped-sheets/namedReferenceTest/xl/_rels/workbook.xml.rels +2 -0
  109. data/examples/unzipped-sheets/namedReferenceTest/xl/calcChain.xml +2 -0
  110. data/examples/unzipped-sheets/namedReferenceTest/xl/styles.xml +2 -0
  111. data/examples/unzipped-sheets/namedReferenceTest/xl/theme/theme1.xml +2 -0
  112. data/examples/unzipped-sheets/namedReferenceTest/xl/workbook.xml +2 -0
  113. data/examples/unzipped-sheets/namedReferenceTest/xl/worksheets/sheet1.xml +2 -0
  114. data/examples/unzipped-sheets/namedReferenceTest/xl/worksheets/sheet2.xml +2 -0
  115. data/examples/unzipped-sheets/pruning/[Content_Types].xml +2 -0
  116. data/examples/unzipped-sheets/pruning/docProps/app.xml +2 -0
  117. data/examples/unzipped-sheets/pruning/docProps/core.xml +2 -0
  118. data/examples/unzipped-sheets/pruning/docProps/thumbnail.jpeg +0 -0
  119. data/examples/unzipped-sheets/pruning/xl/_rels/workbook.xml.rels +2 -0
  120. data/examples/unzipped-sheets/pruning/xl/calcChain.xml +2 -0
  121. data/examples/unzipped-sheets/pruning/xl/sharedStrings.xml +2 -0
  122. data/examples/unzipped-sheets/pruning/xl/styles.xml +2 -0
  123. data/examples/unzipped-sheets/pruning/xl/tables/table1.xml +2 -0
  124. data/examples/unzipped-sheets/pruning/xl/theme/theme1.xml +2 -0
  125. data/examples/unzipped-sheets/pruning/xl/workbook.xml +2 -0
  126. data/examples/unzipped-sheets/pruning/xl/worksheets/_rels/sheet2.xml.rels +2 -0
  127. data/examples/unzipped-sheets/pruning/xl/worksheets/sheet1.xml +2 -0
  128. data/examples/unzipped-sheets/pruning/xl/worksheets/sheet2.xml +2 -0
  129. data/examples/unzipped-sheets/pruning/xl/worksheets/sheet3.xml +2 -0
  130. data/examples/unzipped-sheets/sharedFormulaTest/[Content_Types].xml +2 -0
  131. data/examples/unzipped-sheets/sharedFormulaTest/docProps/app.xml +2 -0
  132. data/examples/unzipped-sheets/sharedFormulaTest/docProps/core.xml +2 -0
  133. data/examples/unzipped-sheets/sharedFormulaTest/docProps/thumbnail.jpeg +0 -0
  134. data/examples/unzipped-sheets/sharedFormulaTest/xl/_rels/workbook.xml.rels +2 -0
  135. data/examples/unzipped-sheets/sharedFormulaTest/xl/calcChain.xml +2 -0
  136. data/examples/unzipped-sheets/sharedFormulaTest/xl/styles.xml +2 -0
  137. data/examples/unzipped-sheets/sharedFormulaTest/xl/theme/theme1.xml +2 -0
  138. data/examples/unzipped-sheets/sharedFormulaTest/xl/workbook.xml +2 -0
  139. data/examples/unzipped-sheets/sharedFormulaTest/xl/worksheets/sheet1.xml +2 -0
  140. data/examples/unzipped-sheets/table-test/[Content_Types].xml +2 -0
  141. data/examples/unzipped-sheets/table-test/docProps/app.xml +2 -0
  142. data/examples/unzipped-sheets/table-test/docProps/core.xml +2 -0
  143. data/examples/unzipped-sheets/table-test/xl/_rels/workbook.xml.rels +2 -0
  144. data/examples/unzipped-sheets/table-test/xl/calcChain.xml +2 -0
  145. data/examples/unzipped-sheets/table-test/xl/printerSettings/printerSettings1.bin +0 -0
  146. data/examples/unzipped-sheets/table-test/xl/sharedStrings.xml +2 -0
  147. data/examples/unzipped-sheets/table-test/xl/styles.xml +2 -0
  148. data/examples/unzipped-sheets/table-test/xl/tables/table1.xml +2 -0
  149. data/examples/unzipped-sheets/table-test/xl/theme/theme1.xml +2 -0
  150. data/examples/unzipped-sheets/table-test/xl/workbook.xml +2 -0
  151. data/examples/unzipped-sheets/table-test/xl/worksheets/_rels/sheet1.xml.rels +2 -0
  152. data/examples/unzipped-sheets/table-test/xl/worksheets/sheet1.xml +2 -0
  153. data/examples/unzipped-sheets/table-test/xl/worksheets/sheet2.xml +2 -0
  154. data/examples/unzipped-sheets/table-test/xl/worksheets/sheet3.xml +2 -0
  155. data/lib/formulae/compile/formula_builder.rb +1 -0
  156. data/lib/formulae/parse/formula_peg.rb +3 -3
  157. data/lib/formulae/parse/formula_peg.txt +3 -3
  158. data/lib/formulae/run/excel_functions.rb +10 -3
  159. data/spec/excel_functions_spec.rb +21 -0
  160. data/spec/formula_peg_spec.rb +3 -0
  161. metadata +156 -3
@@ -0,0 +1,412 @@
1
+ # coding: utf-8
2
+ require_relative '../spreadsheet'
3
+ # OLD UK
4
+ describe 'Sheet2' do
5
+ def sheet2; $spreadsheet ||= Spreadsheet.new; $spreadsheet.sheet2; end
6
+
7
+ it 'cell d5 should equal 160.40945' do
8
+ sheet2.d5.should be_within(16.040945).of(160.40945)
9
+ end
10
+
11
+ it 'cell e5 should equal 157.61832557' do
12
+ sheet2.e5.should be_within(15.761832557).of(157.61832557)
13
+ end
14
+
15
+ it 'cell f5 should equal 154.87576670508201' do
16
+ sheet2.f5.should be_within(15.487576670508203).of(154.87576670508201)
17
+ end
18
+
19
+ it 'cell g5 should equal 152.1809283644136' do
20
+ sheet2.g5.should be_within(15.218092836441361).of(152.1809283644136)
21
+ end
22
+
23
+ it 'cell h5 should equal 149.5329802108728' do
24
+ sheet2.h5.should be_within(14.953298021087281).of(149.5329802108728)
25
+ end
26
+
27
+ it 'cell i5 should equal 146.93110635520364' do
28
+ sheet2.i5.should be_within(14.693110635520364).of(146.93110635520364)
29
+ end
30
+
31
+ it 'cell j5 should equal 144.3745051046231' do
32
+ sheet2.j5.should be_within(14.43745051046231).of(144.3745051046231)
33
+ end
34
+
35
+ it 'cell c6 should equal 134.16697500000004' do
36
+ sheet2.c6.should be_within(13.416697500000005).of(134.16697500000004)
37
+ end
38
+
39
+ it 'cell d6 should equal 131.83246963500005' do
40
+ sheet2.d6.should be_within(13.183246963500006).of(131.83246963500005)
41
+ end
42
+
43
+ it 'cell e6 should equal 129.53858466335103' do
44
+ sheet2.e6.should be_within(12.953858466335104).of(129.53858466335103)
45
+ end
46
+
47
+ it 'cell f6 should equal 127.28461329020871' do
48
+ sheet2.f6.should be_within(12.728461329020872).of(127.28461329020871)
49
+ end
50
+
51
+ it 'cell g6 should equal 125.06986101895905' do
52
+ sheet2.g6.should be_within(12.506986101895905).of(125.06986101895905)
53
+ end
54
+
55
+ it 'cell h6 should equal 122.89364543722914' do
56
+ sheet2.h6.should be_within(12.289364543722915).of(122.89364543722914)
57
+ end
58
+
59
+ it 'cell i6 should equal 120.75529600662136' do
60
+ sheet2.i6.should be_within(12.075529600662136).of(120.75529600662136)
61
+ end
62
+
63
+ it 'cell j6 should equal 118.65415385610618' do
64
+ sheet2.j6.should be_within(11.865415385610618).of(118.65415385610618)
65
+ end
66
+
67
+ it 'cell l6 should equal 0.01739999999999997' do
68
+ sheet2.l6.should be_within(0.0017399999999999972).of(0.01739999999999997)
69
+ end
70
+
71
+ it 'cell c7 should equal 297.41697500000004' do
72
+ sheet2.c7.should be_within(29.741697500000004).of(297.41697500000004)
73
+ end
74
+
75
+ it 'cell d7 should equal 292.24191963500004' do
76
+ sheet2.d7.should be_within(29.224191963500004).of(292.24191963500004)
77
+ end
78
+
79
+ it 'cell e7 should equal 287.156910233351' do
80
+ sheet2.e7.should be_within(28.715691023335104).of(287.156910233351)
81
+ end
82
+
83
+ it 'cell f7 should equal 282.1603799952907' do
84
+ sheet2.f7.should be_within(28.216037999529075).of(282.1603799952907)
85
+ end
86
+
87
+ it 'cell g7 should equal 277.25078938337265' do
88
+ sheet2.g7.should be_within(27.725078938337266).of(277.25078938337265)
89
+ end
90
+
91
+ it 'cell h7 should equal 272.42662564810195' do
92
+ sheet2.h7.should be_within(27.242662564810196).of(272.42662564810195)
93
+ end
94
+
95
+ it 'cell i7 should equal 267.686402361825' do
96
+ sheet2.i7.should be_within(26.768640236182502).of(267.686402361825)
97
+ end
98
+
99
+ it 'cell j7 should equal 263.0286589607293' do
100
+ sheet2.j7.should be_within(26.30286589607293).of(263.0286589607293)
101
+ end
102
+
103
+ it 'cell c9 should equal 2013.0' do
104
+ sheet2.c9.should be_within(201.3).of(2013.0)
105
+ end
106
+
107
+ it 'cell d9 should equal 2014.0' do
108
+ sheet2.d9.should be_within(201.4).of(2014.0)
109
+ end
110
+
111
+ it 'cell e9 should equal 2015.0' do
112
+ sheet2.e9.should be_within(201.5).of(2015.0)
113
+ end
114
+
115
+ it 'cell f9 should equal 2016.0' do
116
+ sheet2.f9.should be_within(201.60000000000002).of(2016.0)
117
+ end
118
+
119
+ it 'cell g9 should equal 2017.0' do
120
+ sheet2.g9.should be_within(201.70000000000002).of(2017.0)
121
+ end
122
+
123
+ it 'cell h9 should equal 2018.0' do
124
+ sheet2.h9.should be_within(201.8).of(2018.0)
125
+ end
126
+
127
+ it 'cell i9 should equal 2019.0' do
128
+ sheet2.i9.should be_within(201.9).of(2019.0)
129
+ end
130
+
131
+ it 'cell j9 should equal 2020.0' do
132
+ sheet2.j9.should be_within(202.0).of(2020.0)
133
+ end
134
+
135
+ it 'cell d10 should equal 1.0' do
136
+ sheet2.d10.should be_within(0.1).of(1.0)
137
+ end
138
+
139
+ it 'cell e10 should equal 1.0' do
140
+ sheet2.e10.should be_within(0.1).of(1.0)
141
+ end
142
+
143
+ it 'cell f10 should equal 1.0' do
144
+ sheet2.f10.should be_within(0.1).of(1.0)
145
+ end
146
+
147
+ it 'cell g10 should equal 1.0' do
148
+ sheet2.g10.should be_within(0.1).of(1.0)
149
+ end
150
+
151
+ it 'cell h10 should equal 1.0' do
152
+ sheet2.h10.should be_within(0.1).of(1.0)
153
+ end
154
+
155
+ it 'cell i10 should equal 1.0' do
156
+ sheet2.i10.should be_within(0.1).of(1.0)
157
+ end
158
+
159
+ it 'cell j10 should equal 1.0' do
160
+ sheet2.j10.should be_within(0.1).of(1.0)
161
+ end
162
+
163
+ it 'cell d11 should equal 0.3142857142857143' do
164
+ sheet2.d11.should be_within(0.03142857142857143).of(0.3142857142857143)
165
+ end
166
+
167
+ it 'cell e11 should equal 0.4285714285714286' do
168
+ sheet2.e11.should be_within(0.042857142857142864).of(0.4285714285714286)
169
+ end
170
+
171
+ it 'cell f11 should equal 0.5428571428571429' do
172
+ sheet2.f11.should be_within(0.0542857142857143).of(0.5428571428571429)
173
+ end
174
+
175
+ it 'cell g11 should equal 0.6571428571428573' do
176
+ sheet2.g11.should be_within(0.06571428571428573).of(0.6571428571428573)
177
+ end
178
+
179
+ it 'cell h11 should equal 0.7714285714285716' do
180
+ sheet2.h11.should be_within(0.07714285714285717).of(0.7714285714285716)
181
+ end
182
+
183
+ it 'cell i11 should equal 0.8857142857142859' do
184
+ sheet2.i11.should be_within(0.08857142857142859).of(0.8857142857142859)
185
+ end
186
+
187
+ it 'cell l11 should equal 0.1142857142857143' do
188
+ sheet2.l11.should be_within(0.01142857142857143).of(0.1142857142857143)
189
+ end
190
+
191
+ it 'cell c12 should equal 0.6391141426947805' do
192
+ sheet2.c12.should be_within(0.06391141426947805).of(0.6391141426947805)
193
+ end
194
+
195
+ it 'cell d12 should equal 0.6906692651669547' do
196
+ sheet2.d12.should be_within(0.06906692651669548).of(0.6906692651669547)
197
+ end
198
+
199
+ it 'cell e12 should equal 0.742224387639129' do
200
+ sheet2.e12.should be_within(0.0742224387639129).of(0.742224387639129)
201
+ end
202
+
203
+ it 'cell f12 should equal 0.7937795101113032' do
204
+ sheet2.f12.should be_within(0.07937795101113032).of(0.7937795101113032)
205
+ end
206
+
207
+ it 'cell g12 should equal 0.8453346325834775' do
208
+ sheet2.g12.should be_within(0.08453346325834776).of(0.8453346325834775)
209
+ end
210
+
211
+ it 'cell h12 should equal 0.8968897550556517' do
212
+ sheet2.h12.should be_within(0.08968897550556518).of(0.8968897550556517)
213
+ end
214
+
215
+ it 'cell i12 should equal 0.9484448775278258' do
216
+ sheet2.i12.should be_within(0.09484448775278259).of(0.9484448775278258)
217
+ end
218
+
219
+ it 'cell j12 should equal 1.0' do
220
+ sheet2.j12.should be_within(0.1).of(1.0)
221
+ end
222
+
223
+ it 'cell c14 should equal 2013.0' do
224
+ sheet2.c14.should be_within(201.3).of(2013.0)
225
+ end
226
+
227
+ it 'cell d14 should equal 2014.0' do
228
+ sheet2.d14.should be_within(201.4).of(2014.0)
229
+ end
230
+
231
+ it 'cell e14 should equal 2015.0' do
232
+ sheet2.e14.should be_within(201.5).of(2015.0)
233
+ end
234
+
235
+ it 'cell f14 should equal 2016.0' do
236
+ sheet2.f14.should be_within(201.60000000000002).of(2016.0)
237
+ end
238
+
239
+ it 'cell g14 should equal 2017.0' do
240
+ sheet2.g14.should be_within(201.70000000000002).of(2017.0)
241
+ end
242
+
243
+ it 'cell h14 should equal 2018.0' do
244
+ sheet2.h14.should be_within(201.8).of(2018.0)
245
+ end
246
+
247
+ it 'cell i14 should equal 2019.0' do
248
+ sheet2.i14.should be_within(201.9).of(2019.0)
249
+ end
250
+
251
+ it 'cell j14 should equal 2020.0' do
252
+ sheet2.j14.should be_within(202.0).of(2020.0)
253
+ end
254
+
255
+ it 'cell d15 should equal 20.0' do
256
+ sheet2.d15.should be_within(2.0).of(20.0)
257
+ end
258
+
259
+ it 'cell e15 should equal 20.0' do
260
+ sheet2.e15.should be_within(2.0).of(20.0)
261
+ end
262
+
263
+ it 'cell f15 should equal 20.0' do
264
+ sheet2.f15.should be_within(2.0).of(20.0)
265
+ end
266
+
267
+ it 'cell g15 should equal 20.0' do
268
+ sheet2.g15.should be_within(2.0).of(20.0)
269
+ end
270
+
271
+ it 'cell h15 should equal 20.0' do
272
+ sheet2.h15.should be_within(2.0).of(20.0)
273
+ end
274
+
275
+ it 'cell i15 should equal 20.0' do
276
+ sheet2.i15.should be_within(2.0).of(20.0)
277
+ end
278
+
279
+ it 'cell j15 should equal 20.0' do
280
+ sheet2.j15.should be_within(2.0).of(20.0)
281
+ end
282
+
283
+ it 'cell c17 should equal 2013.0' do
284
+ sheet2.c17.should be_within(201.3).of(2013.0)
285
+ end
286
+
287
+ it 'cell d17 should equal 2014.0' do
288
+ sheet2.d17.should be_within(201.4).of(2014.0)
289
+ end
290
+
291
+ it 'cell e17 should equal 2015.0' do
292
+ sheet2.e17.should be_within(201.5).of(2015.0)
293
+ end
294
+
295
+ it 'cell f17 should equal 2016.0' do
296
+ sheet2.f17.should be_within(201.60000000000002).of(2016.0)
297
+ end
298
+
299
+ it 'cell g17 should equal 2017.0' do
300
+ sheet2.g17.should be_within(201.70000000000002).of(2017.0)
301
+ end
302
+
303
+ it 'cell h17 should equal 2018.0' do
304
+ sheet2.h17.should be_within(201.8).of(2018.0)
305
+ end
306
+
307
+ it 'cell i17 should equal 2019.0' do
308
+ sheet2.i17.should be_within(201.9).of(2019.0)
309
+ end
310
+
311
+ it 'cell j17 should equal 2020.0' do
312
+ sheet2.j17.should be_within(202.0).of(2020.0)
313
+ end
314
+
315
+ it 'cell c18 should equal 3.265' do
316
+ sheet2.c18.should be_within(0.3265).of(3.265)
317
+ end
318
+
319
+ it 'cell d18 should equal 3.208189' do
320
+ sheet2.d18.should be_within(0.3208189).of(3.208189)
321
+ end
322
+
323
+ it 'cell e18 should equal 3.1523665114' do
324
+ sheet2.e18.should be_within(0.31523665114).of(3.1523665114)
325
+ end
326
+
327
+ it 'cell f18 should equal 3.09751533410164' do
328
+ sheet2.f18.should be_within(0.30975153341016404).of(3.09751533410164)
329
+ end
330
+
331
+ it 'cell g18 should equal 3.043618567288272' do
332
+ sheet2.g18.should be_within(0.3043618567288272).of(3.043618567288272)
333
+ end
334
+
335
+ it 'cell h18 should equal 2.990659604217456' do
336
+ sheet2.h18.should be_within(0.2990659604217456).of(2.990659604217456)
337
+ end
338
+
339
+ it 'cell i18 should equal 2.9386221271040727' do
340
+ sheet2.i18.should be_within(0.2938622127104073).of(2.9386221271040727)
341
+ end
342
+
343
+ it 'cell j18 should equal 2.8874901020924617' do
344
+ sheet2.j18.should be_within(0.2887490102092462).of(2.8874901020924617)
345
+ end
346
+
347
+ it 'cell c19 should equal 0.5366679000000002' do
348
+ sheet2.c19.should be_within(0.05366679000000002).of(0.5366679000000002)
349
+ end
350
+
351
+ it 'cell d19 should equal 0.8286612377057146' do
352
+ sheet2.d19.should be_within(0.08286612377057147).of(0.8286612377057146)
353
+ end
354
+
355
+ it 'cell e19 should equal 1.110330725685866' do
356
+ sheet2.e19.should be_within(0.11103307256858662).of(1.110330725685866)
357
+ end
358
+
359
+ it 'cell f19 should equal 1.3819472300079803' do
360
+ sheet2.f19.should be_within(0.13819472300079802).of(1.3819472300079803)
361
+ end
362
+
363
+ it 'cell g19 should equal 1.6437753162491764' do
364
+ sheet2.g19.should be_within(0.16437753162491764).of(1.6437753162491764)
365
+ end
366
+
367
+ it 'cell h19 should equal 1.8960733867458215' do
368
+ sheet2.h19.should be_within(0.18960733867458215).of(1.8960733867458215)
369
+ end
370
+
371
+ it 'cell i19 should equal 2.1390938149744363' do
372
+ sheet2.i19.should be_within(0.21390938149744365).of(2.1390938149744363)
373
+ end
374
+
375
+ it 'cell j19 should equal 2.3730830771221236' do
376
+ sheet2.j19.should be_within(0.23730830771221237).of(2.3730830771221236)
377
+ end
378
+
379
+ it 'cell c20 should equal 3.8016679' do
380
+ sheet2.c20.should be_within(0.38016679000000003).of(3.8016679)
381
+ end
382
+
383
+ it 'cell d20 should equal 4.036850237705714' do
384
+ sheet2.d20.should be_within(0.4036850237705714).of(4.036850237705714)
385
+ end
386
+
387
+ it 'cell e20 should equal 4.262697237085867' do
388
+ sheet2.e20.should be_within(0.4262697237085867).of(4.262697237085867)
389
+ end
390
+
391
+ it 'cell f20 should equal 4.479462564109621' do
392
+ sheet2.f20.should be_within(0.44794625641096214).of(4.479462564109621)
393
+ end
394
+
395
+ it 'cell g20 should equal 4.687393883537449' do
396
+ sheet2.g20.should be_within(0.4687393883537449).of(4.687393883537449)
397
+ end
398
+
399
+ it 'cell h20 should equal 4.886732990963277' do
400
+ sheet2.h20.should be_within(0.48867329909632773).of(4.886732990963277)
401
+ end
402
+
403
+ it 'cell i20 should equal 5.077715942078508' do
404
+ sheet2.i20.should be_within(0.5077715942078508).of(5.077715942078508)
405
+ end
406
+
407
+ it 'cell j20 should equal 5.260573179214585' do
408
+ sheet2.j20.should be_within(0.5260573179214586).of(5.260573179214585)
409
+ end
410
+
411
+ end
412
+
@@ -0,0 +1,9 @@
1
+ # coding: utf-8
2
+ require 'rubyfromexcel'
3
+
4
+ class Spreadsheet
5
+ include RubyFromExcel::ExcelFunctions
6
+
7
+ end
8
+
9
+ Dir[File.join(File.dirname(__FILE__),"sheets/","sheet*.rb")].each {|f| Spreadsheet.autoload(File.basename(f,".rb").capitalize,f)}
@@ -0,0 +1,305 @@
1
+ # coding: utf-8
2
+ # EU
3
+ class Sheet1 < Spreadsheet
4
+ def b1; "Note, numbers not checked. Worry about power sector figure. Worry about the UK share of auction revenues."; end
5
+ def d2; "Expansion"; end
6
+ def d3; "Additions"; end
7
+ def o3; "Annual"; end
8
+ def b4; "EU-27 Emissions"; end
9
+ def c4; "2005-6"; end
10
+ def d4; "Phase II"; end
11
+ def e4; "Phase III"; end
12
+ def f4; 2013.0; end
13
+ def g4; 2014.0; end
14
+ def h4; 2015.0; end
15
+ def i4; 2016.0; end
16
+ def j4; 2017.0; end
17
+ def k4; 2018.0; end
18
+ def l4; 2019.0; end
19
+ def m4; 2020.0; end
20
+ def o4; "Change"; end
21
+ def b5; "Power sector"; end
22
+ def c5; 1150.0; end
23
+ def d5; 50.0; end
24
+ def e5; 50.0; end
25
+ def f5; @f5 ||= +(c5+d5+e5)*0.9; end
26
+ def g5; @g5 ||= f5*(1.0-o5); end
27
+ def h5; @h5 ||= g5*(1.0-o5); end
28
+ def i5; @i5 ||= h5*(1.0-o5); end
29
+ def j5; @j5 ||= i5*(1.0-o5); end
30
+ def k5; @k5 ||= j5*(1.0-o5); end
31
+ def l5; @l5 ||= k5*(1.0-o5); end
32
+ def m5; @m5 ||= l5*(1.0-o5); end
33
+ def n5; "mtCO2"; end
34
+ def o5; 0.02; end
35
+ def b6; "Leakage sectors"; end
36
+ def c6; 350.0; end
37
+ def f6; @f6 ||= +(c6+d6+e6)*0.95; end
38
+ def g6; @g6 ||= f6*(1.0-o5); end
39
+ def h6; @h6 ||= g6*(1.0-o5); end
40
+ def i6; @i6 ||= h6*(1.0-o5); end
41
+ def j6; @j6 ||= i6*(1.0-o5); end
42
+ def k6; @k6 ||= j6*(1.0-o5); end
43
+ def l6; @l6 ||= k6*(1.0-o5); end
44
+ def m6; @m6 ||= l6*(1.0-o5); end
45
+ def n6; "mtCO2"; end
46
+ def o6; 0.01; end
47
+ def b7; "Other sectors"; end
48
+ def c7; 550.0; end
49
+ def d7; 100.0; end
50
+ def e7; 100.0; end
51
+ def f7; @f7 ||= +(c7+d7+e7)*0.95; end
52
+ def g7; @g7 ||= f7*(1.0-o5); end
53
+ def h7; @h7 ||= g7*(1.0-o5); end
54
+ def i7; @i7 ||= h7*(1.0-o5); end
55
+ def j7; @j7 ||= i7*(1.0-o5); end
56
+ def k7; @k7 ||= j7*(1.0-o5); end
57
+ def l7; @l7 ||= k7*(1.0-o5); end
58
+ def m7; @m7 ||= l7*(1.0-o5); end
59
+ def n7; "mtCO2"; end
60
+ def o7; 0.01; end
61
+ def b8; "Total"; end
62
+ def f8; @f8 ||= +sum(a('f5','f7')); end
63
+ def g8; @g8 ||= +sum(a('g5','g7')); end
64
+ def h8; @h8 ||= +sum(a('h5','h7')); end
65
+ def i8; @i8 ||= +sum(a('i5','i7')); end
66
+ def j8; @j8 ||= +sum(a('j5','j7')); end
67
+ def k8; @k8 ||= +sum(a('k5','k7')); end
68
+ def l8; @l8 ||= +sum(a('l5','l7')); end
69
+ def m8; @m8 ||= +sum(a('m5','m7')); end
70
+ def n8; "mtCO2"; end
71
+ def b10; "Proportion allocated for free"; end
72
+ def f10; @f10 ||= f4; end
73
+ def g10; @g10 ||= g4; end
74
+ def h10; @h10 ||= h4; end
75
+ def i10; @i10 ||= i4; end
76
+ def j10; @j10 ||= j4; end
77
+ def k10; @k10 ||= k4; end
78
+ def l10; @l10 ||= l4; end
79
+ def m10; @m10 ||= m4; end
80
+ def b11; "Power sector"; end
81
+ def f11; 0.0; end
82
+ def g11; @g11 ||= f11; end
83
+ def h11; @h11 ||= g11; end
84
+ def i11; @i11 ||= h11; end
85
+ def j11; @j11 ||= i11; end
86
+ def k11; @k11 ||= j11; end
87
+ def l11; @l11 ||= k11; end
88
+ def m11; @m11 ||= l11; end
89
+ def n11; "%"; end
90
+ def b12; @b12 ||= +b6; end
91
+ def f12; 0.9; end
92
+ def g12; @g12 ||= +f12+o12; end
93
+ def h12; @h12 ||= +g12+o12; end
94
+ def i12; @i12 ||= +h12+o12; end
95
+ def j12; @j12 ||= +i12+o12; end
96
+ def k12; @k12 ||= +j12+o12; end
97
+ def l12; @l12 ||= +k12+o12; end
98
+ def m12; @m12 ||= +l12+o12; end
99
+ def o12; -0.025; end
100
+ def b13; "Other"; end
101
+ def f13; 0.8; end
102
+ def g13; @g13 ||= f13+o13; end
103
+ def h13; @h13 ||= g13+o13; end
104
+ def i13; @i13 ||= h13+o13; end
105
+ def j13; @j13 ||= i13+o13; end
106
+ def k13; @k13 ||= j13+o13; end
107
+ def l13; @l13 ||= k13+o13; end
108
+ def m13; 0.0; end
109
+ def n13; "%"; end
110
+ def o13; @o13 ||= (m13-f13)/(m10-f10); end
111
+ def b14; "Average non-power sectors"; end
112
+ def f14; @f14 ||= +(f6*f12+f7*f13)/(f6+f7); end
113
+ def g14; @g14 ||= +(g6*g12+g7*g13)/(g6+g7); end
114
+ def h14; @h14 ||= +(h6*h12+h7*h13)/(h6+h7); end
115
+ def i14; @i14 ||= +(i6*i12+i7*i13)/(i6+i7); end
116
+ def j14; @j14 ||= +(j6*j12+j7*j13)/(j6+j7); end
117
+ def k14; @k14 ||= +(k6*k12+k7*k13)/(k6+k7); end
118
+ def l14; @l14 ||= +(l6*l12+l7*l13)/(l6+l7); end
119
+ def m14; @m14 ||= +(m6*m12+m7*m13)/(m6+m7); end
120
+ def b15; "Total free allocation, % emissions"; end
121
+ def f15; @f15 ||= ((f11*f5)+(f12*f6)+(f13*f7))/f8; end
122
+ def g15; @g15 ||= ((g11*g5)+(g12*g6)+(g13*g7))/g8; end
123
+ def h15; @h15 ||= ((h11*h5)+(h12*h6)+(h13*h7))/h8; end
124
+ def i15; @i15 ||= ((i11*i5)+(i12*i6)+(i13*i7))/i8; end
125
+ def j15; @j15 ||= ((j11*j5)+(j12*j6)+(j13*j7))/j8; end
126
+ def k15; @k15 ||= ((k11*k5)+(k12*k6)+(k13*k7))/k8; end
127
+ def l15; @l15 ||= ((l11*l5)+(l12*l6)+(l13*l7))/l8; end
128
+ def m15; @m15 ||= ((m11*m5)+(m12*m6)+(m13*m7))/m8; end
129
+ def n15; "%"; end
130
+ def b17; "Proportion auctioned, other sectors"; end
131
+ def f17; @f17 ||= 1.0-f14; end
132
+ def g17; @g17 ||= 1.0-g14; end
133
+ def h17; @h17 ||= 1.0-h14; end
134
+ def i17; @i17 ||= 1.0-i14; end
135
+ def j17; @j17 ||= 1.0-j14; end
136
+ def k17; @k17 ||= 1.0-k14; end
137
+ def l17; @l17 ||= 1.0-l14; end
138
+ def m17; @m17 ||= 1.0-m14; end
139
+ def b18; "Total allowances"; end
140
+ def d18; 2010.0; end
141
+ def f18; @f18 ||= f10; end
142
+ def g18; @g18 ||= g10; end
143
+ def h18; @h18 ||= h10; end
144
+ def i18; @i18 ||= i10; end
145
+ def j18; @j18 ||= j10; end
146
+ def k18; @k18 ||= k10; end
147
+ def l18; @l18 ||= l10; end
148
+ def m18; @m18 ||= m10; end
149
+ def b19; "Total allowances"; end
150
+ def d19; @d19 ||= +(2100.0+100.0)*0.935+150.0; end
151
+ def f19; @f19 ||= +d19*(1.0-3.0*o19); end
152
+ def g19; @g19 ||= +f19*(1.0-o19); end
153
+ def h19; @h19 ||= +g19*(1.0-o19); end
154
+ def i19; @i19 ||= +h19*(1.0-o19); end
155
+ def j19; @j19 ||= +i19*(1.0-o19); end
156
+ def k19; @k19 ||= +j19*(1.0-o19); end
157
+ def l19; @l19 ||= +k19*(1.0-o19); end
158
+ def m19; @m19 ||= +l19*(1.0-o19); end
159
+ def o19; 0.0174; end
160
+ def p19; "Note: 1720 \"based on current scope\""; end
161
+ def b20; "Total free allocation, MtCO2"; end
162
+ def f20; @f20 ||= +f6*f12+f7*f13*f19/f8; end
163
+ def g20; @g20 ||= +f6*g12+f7*g13*g19/g8; end
164
+ def h20; @h20 ||= +f6*h12+f7*h13*h19/h8; end
165
+ def i20; @i20 ||= +f6*i12+f7*i13*i19/i8; end
166
+ def j20; @j20 ||= +f6*j12+f7*j13*j19/j8; end
167
+ def k20; @k20 ||= +f6*k12+f7*k13*k19/k8; end
168
+ def l20; @l20 ||= +f6*l12+f7*l13*l19/l8; end
169
+ def m20; @m20 ||= +f6*m12+f7*m13*m19/m8; end
170
+ def b21; "Volume available for auctioning"; end
171
+ def f21; @f21 ||= +f19-f20; end
172
+ def g21; @g21 ||= +g19-g20; end
173
+ def h21; @h21 ||= +h19-h20; end
174
+ def i21; @i21 ||= +i19-i20; end
175
+ def j21; @j21 ||= +j19-j20; end
176
+ def k21; @k21 ||= +k19-k20; end
177
+ def l21; @l21 ||= +l19-l20; end
178
+ def m21; @m21 ||= +m19-m20; end
179
+ def b23; "Carbon Price"; end
180
+ def f23; @f23 ||= f10; end
181
+ def g23; @g23 ||= g10; end
182
+ def h23; @h23 ||= h10; end
183
+ def i23; @i23 ||= i10; end
184
+ def j23; @j23 ||= j10; end
185
+ def k23; @k23 ||= k10; end
186
+ def l23; @l23 ||= l10; end
187
+ def m23; @m23 ||= m10; end
188
+ def b24; "Price per allowance"; end
189
+ def f24; 25.0; end
190
+ def g24; @g24 ||= +f24*(1.0+o24); end
191
+ def h24; @h24 ||= +g24*(1.0+o24); end
192
+ def i24; @i24 ||= +h24*(1.0+o24); end
193
+ def j24; @j24 ||= +i24*(1.0+o24); end
194
+ def k24; @k24 ||= +j24*(1.0+o24); end
195
+ def l24; @l24 ||= +k24*(1.0+o24); end
196
+ def m24; @m24 ||= +l24*(1.0+o24); end
197
+ def n24; "€/tCO2"; end
198
+ def o24; 0.05; end
199
+ def b25; "Total revenue from auctions"; end
200
+ def f25; @f25 ||= +f24*f21; end
201
+ def g25; @g25 ||= +g24*g21; end
202
+ def h25; @h25 ||= +h24*h21; end
203
+ def i25; @i25 ||= +i24*i21; end
204
+ def j25; @j25 ||= +j24*j21; end
205
+ def k25; @k25 ||= +k24*k21; end
206
+ def l25; @l25 ||= +l24*l21; end
207
+ def m25; @m25 ||= +m24*m21; end
208
+ def b27; "EU-27 Auction volumes- bought into proportion to net shortfall"; end
209
+ def f27; @f27 ||= f10; end
210
+ def g27; @g27 ||= g10; end
211
+ def h27; @h27 ||= h10; end
212
+ def i27; @i27 ||= i10; end
213
+ def j27; @j27 ||= j10; end
214
+ def k27; @k27 ||= k10; end
215
+ def l27; @l27 ||= l10; end
216
+ def m27; @m27 ||= m10; end
217
+ def b28; "Power sector"; end
218
+ def f28; @f28 ||= +f5*(1.0-f11)*(f19/f8); end
219
+ def g28; @g28 ||= +g5*(1.0-g11)*(g19/g8); end
220
+ def h28; @h28 ||= +h5*(1.0-h11)*(h19/h8); end
221
+ def i28; @i28 ||= +i5*(1.0-i11)*(i19/i8); end
222
+ def j28; @j28 ||= +j5*(1.0-j11)*(j19/j8); end
223
+ def k28; @k28 ||= +k5*(1.0-k11)*(k19/k8); end
224
+ def l28; @l28 ||= +l5*(1.0-l11)*(l19/l8); end
225
+ def m28; @m28 ||= +m5*(1.0-m11)*(m19/m8); end
226
+ def b29; @b29 ||= +b6; end
227
+ def f29; @f29 ||= +f6*(1.0-f12)*(f19/f8); end
228
+ def g29; @g29 ||= +g6*(1.0-g12)*(g19/g8); end
229
+ def h29; @h29 ||= +h6*(1.0-h12)*(h19/h8); end
230
+ def i29; @i29 ||= +i6*(1.0-i12)*(i19/i8); end
231
+ def j29; @j29 ||= +j6*(1.0-j12)*(j19/j8); end
232
+ def k29; @k29 ||= +k6*(1.0-k12)*(k19/k8); end
233
+ def l29; @l29 ||= +l6*(1.0-l12)*(l19/l8); end
234
+ def m29; @m29 ||= +m6*(1.0-m12)*(m19/m8); end
235
+ def b30; "Other"; end
236
+ def f30; @f30 ||= +f7*(1.0-f13)*(f19/f8); end
237
+ def g30; @g30 ||= +g7*(1.0-g13)*(g19/g8); end
238
+ def h30; @h30 ||= +h7*(1.0-h13)*(h19/h8); end
239
+ def i30; @i30 ||= +i7*(1.0-i13)*(i19/i8); end
240
+ def j30; @j30 ||= +j7*(1.0-j13)*(j19/j8); end
241
+ def k30; @k30 ||= +k7*(1.0-k13)*(k19/k8); end
242
+ def l30; @l30 ||= +l7*(1.0-l13)*(l19/l8); end
243
+ def m30; @m30 ||= +m7*(1.0-m13)*(m19/m8); end
244
+ def b31; "Total"; end
245
+ def f31; @f31 ||= +sum(a('f28','f30')); end
246
+ def g31; @g31 ||= +sum(a('g28','g30')); end
247
+ def h31; @h31 ||= +sum(a('h28','h30')); end
248
+ def i31; @i31 ||= +sum(a('i28','i30')); end
249
+ def j31; @j31 ||= +sum(a('j28','j30')); end
250
+ def k31; @k31 ||= +sum(a('k28','k30')); end
251
+ def l31; @l31 ||= +sum(a('l28','l30')); end
252
+ def m31; @m31 ||= +sum(a('m28','m30')); end
253
+ def b33; "Revenues"; end
254
+ def b34; "Power sector"; end
255
+ def f34; @f34 ||= +f28*f24; end
256
+ def g34; @g34 ||= +g28*g24; end
257
+ def h34; @h34 ||= +h28*h24; end
258
+ def i34; @i34 ||= +i28*i24; end
259
+ def j34; @j34 ||= +j28*j24; end
260
+ def k34; @k34 ||= +k28*k24; end
261
+ def l34; @l34 ||= +l28*l24; end
262
+ def m34; @m34 ||= +m28*m24; end
263
+ def b35; "Other sectors"; end
264
+ def f35; @f35 ||= +(f29+f30)*f24; end
265
+ def g35; @g35 ||= +(g29+g30)*g24; end
266
+ def h35; @h35 ||= +(h29+h30)*h24; end
267
+ def i35; @i35 ||= +(i29+i30)*i24; end
268
+ def j35; @j35 ||= +(j29+j30)*j24; end
269
+ def k35; @k35 ||= +(k29+k30)*k24; end
270
+ def l35; @l35 ||= +(l29+l30)*l24; end
271
+ def m35; @m35 ||= +(m29+m30)*m24; end
272
+ def b39; "2005 UK ETS Emissions"; end
273
+ def f39; 242.0; end
274
+ def g39; "mtCO2"; end
275
+ def n39; " "; end
276
+ def b40; "2005 EU ETS Emissions"; end
277
+ def f40; 1785.0; end
278
+ def g40; "mtCO2"; end
279
+ def b41; "Basic UK share of auction revenues"; end
280
+ def f41; @f41 ||= f39/f40; end
281
+ def b42; "Amount of share auctioned in UK"; end
282
+ def f42; 0.9; end
283
+ def b43; "Actual UK share of auction revenues"; end
284
+ def f43; @f43 ||= f42*f41; end
285
+ def b45; "UK Auction revenues"; end
286
+ def f45; @f45 ||= f4; end
287
+ def g45; @g45 ||= g4; end
288
+ def h45; @h45 ||= h4; end
289
+ def i45; @i45 ||= i4; end
290
+ def j45; @j45 ||= j4; end
291
+ def k45; @k45 ||= k4; end
292
+ def l45; @l45 ||= l4; end
293
+ def m45; @m45 ||= m4; end
294
+ def b46; "Total"; end
295
+ def f46; @f46 ||= f43*f31; end
296
+ def g46; @g46 ||= f43*g31; end
297
+ def h46; @h46 ||= f43*h31; end
298
+ def i46; @i46 ||= f43*i31; end
299
+ def j46; @j46 ||= f43*j31; end
300
+ def k46; @k46 ||= f43*k31; end
301
+ def l46; @l46 ||= f43*l31; end
302
+ def m46; @m46 ||= f43*m31; end
303
+ def n46; "€bn"; end
304
+ end
305
+