roo 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,91 +36,50 @@
36
36
  <a href="http://rubyforge.org/projects/roo" class="numbers">1.1.0</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
-
40
-
41
- <p>This gem allows you to access the content of</p>
42
-
43
-
44
- <ul>
39
+ <p>This gem allows you to access the content of</p>
40
+ <ul>
45
41
  <li>Open-office spreadsheets (.ods)</li>
46
- <li>Excel spreadsheets (.xls) </li>
47
- <li>Google (online) spreadsheets</li>
48
- <li>Excel&#8217;s new file format .xlsx</li>
49
- </ul>
50
-
51
-
52
- <h2>Supporting this project</h2>
53
-
54
-
55
- <p>Die Programme dieses Projekts sind kostenlos erhältlich und verwendbar.
56
- Du kannst jedoch die weitere Entwicklung dieses Projekts mit einer finanziellen
57
- Zuwendung unterstützen (ansonsten müßte ich mich verstärkt anderen Projekten
58
- widmen, die mehr finanziellen Ertrag einbringen, damit ich auch morgen noch
42
+ <li>Excel spreadsheets (.xls)</li>
43
+ <li>Google (online) spreadsheets</li>
44
+ <li>Excel&#8217;s new file format .xlsx</li>
45
+ </ul>
46
+ <h2>Supporting this project</h2>
47
+ <p>Die Programme dieses Projekts sind kostenlos erhältlich und verwendbar. <br />
48
+ Du kannst jedoch die weitere Entwicklung dieses Projekts mit einer finanziellen <br />
49
+ Zuwendung unterstützen (ansonsten müßte ich mich verstärkt anderen Projekten<br />
50
+ widmen, die mehr finanziellen Ertrag einbringen, damit ich auch morgen noch<br />
59
51
  für meine Katzen das Futter kaufen kann :-)).</p>
60
-
61
-
62
- <p>Am bequemsten kannst du per Paypal an die Email-Adresse thopre@gmail.com
63
- bezahlen.
52
+ <p>Am bequemsten kannst du per Paypal an die Email-Adresse thopre@gmail.com <br />
53
+ bezahlen. <br />
64
54
  Falls du per Überweisung zahlen willst, frage bitte nach meiner Kontoverbindung!</p>
65
-
66
-
67
- <p>Ich werde, aufteilt pro Quartal, eine Liste der Spender mit Namen und Betrag,
68
- sortiert nach Spendenhöhe hier veröffenlichen. Wenn von dir nichts anderes
69
- mitgeteilt, werde ich dich nach deinem Namen, soweit aus der Email-Adresse
70
- ersichtlich, in der Liste veröffenlichen. Falls etwas anderes gewünscht wird,
55
+ <p>Ich werde, aufteilt pro Quartal, eine Liste der Spender mit Namen und Betrag, <br />
56
+ sortiert nach Spendenhöhe hier veröffenlichen. Wenn von dir nichts anderes<br />
57
+ mitgeteilt, werde ich dich nach deinem Namen, soweit aus der Email-Adresse<br />
58
+ ersichtlich, in der Liste veröffenlichen. Falls etwas anderes gewünscht wird,<br />
71
59
  z. B. &#8220;Firma <span class="caps">ABC</span> GmbH&#8221; oder anonym, dann teile mir dies bitte mit!</p>
72
-
73
-
74
- <h3>Spender</h3>
75
-
76
-
77
- <h4>April-Juni 2008</h4>
78
-
79
-
80
- <table>
81
- <tr>
82
- <td>Betrag</td>
83
- <td>Name</td>
84
- </tr>
85
- <tr>
86
- <td>0,00 &euro;</td>
87
- <td>Test</td>
88
- </tr>
89
- </table>
90
-
91
-
92
-
93
-
94
- <h2>Installing</h2>
95
-
96
-
60
+ <h3>Spender</h3>
61
+ <h4>April-Juni 2008</h4>
62
+ <table>
63
+ <tr>
64
+ <td>Betrag</td>
65
+ <td>Name</td>
66
+ </tr>
67
+ <tr>
68
+ <td>0,00 &euro;</td>
69
+ <td>Test</td>
70
+ </tr>
71
+ </table>
72
+ <h2>Installing</h2>
97
73
  <pre syntax="ruby">[sudo] gem install roo</pre>
98
-
99
- <h2>The basics</h2>
100
-
101
-
102
- <p>Currently only read-access is implemented.
74
+ <h2>The basics</h2>
75
+ <p>Currently only read-access is implemented.<br />
103
76
  Google spreadsheets can be read and written.</p>
104
-
105
-
106
- <p>Please note that the upper left cell of a table is numbered (1,1) or (1,&#8217;A&#8217;) (not 0,0).</p>
107
-
108
-
109
- <h2>Demonstration of usage</h2>
110
-
111
-
112
- <p>Supposed you have created this spreadsheet:</p>
113
-
114
-
115
- <p><img src="Screenshot-spreadsheet3.png"></p>
116
-
117
-
118
- <p>which includes the amount of work you have done for a customer.</p>
119
-
120
-
121
- <p>You can now process this spreadsheet with the following sample code.</p>
122
-
123
-
77
+ <p>Please note that the upper left cell of a table is numbered (1,1) or (1,&#8217;A&#8217;) (not 0,0).</p>
78
+ <h2>Demonstration of usage</h2>
79
+ <p>Supposed you have created this spreadsheet:</p>
80
+ <p><img src="Screenshot-spreadsheet3.png"></p>
81
+ <p>which includes the amount of work you have done for a customer.</p>
82
+ <p>You can now process this spreadsheet with the following sample code.</p>
124
83
  <pre>
125
84
  <code>
126
85
  1 require 'rubygems'
@@ -139,15 +98,12 @@ Google spreadsheets can be read and written.</p>
139
98
  14 comment = oo.cell(line,'F')
140
99
  15 amount = sum * HOURLY_RATE
141
100
  16 if date
142
- 17 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
101
+ 17 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
143
102
  18 end
144
103
  19 end
145
104
  </code>
146
105
  </pre>
147
-
148
- <p>which produces this output</p>
149
-
150
-
106
+ <p>which produces this output</p>
151
107
  <pre>
152
108
  <code>
153
109
  2007-05-07 1.0 123.45 Task 1
@@ -161,95 +117,65 @@ Google spreadsheets can be read and written.</p>
161
117
  2007-05-15 1.0 123.45 Task 3
162
118
  </code>
163
119
  </pre>
164
-
165
- <p>With the methods</p>
166
-
167
-
168
- <code>first_column</code>,
169
- <code>last_column</code>,
170
- <code>first_row</code> and
171
- <code>last_row</code>
172
-
173
- <p>you can change line 8 from</p>
174
-
175
-
120
+ <p>With the methods</p>
121
+ <p><code>first_column</code>,<br />
122
+ <code>last_column</code>,<br />
123
+ <code>first_row</code> and<br />
124
+ <code>last_row</code></p>
125
+ <p>you can change line 8 from</p>
176
126
  <pre>
177
127
  <code>
178
128
  4.upto(12) do |line|
179
129
  </code>
180
130
  </pre>
181
-
182
- <p>to</p>
183
-
184
-
131
+ <p>to</p>
185
132
  <pre>
186
133
  <code>
187
134
  4.upto(oo.last_row) do |line|
188
135
  </code>
189
136
  </pre>
190
-
191
- <h3>Cell Types</h3>
192
-
193
-
194
- <p>oo.<strong>celltype</strong>(row,col) returns the type of a cell. Currently these types will be
137
+ <h3>Cell Types</h3>
138
+ <p>oo.<strong>celltype</strong>(row,col) returns the type of a cell. Currently these types will be<br />
195
139
  returned:</p>
196
-
197
-
198
- <ul>
140
+ <ul>
199
141
  <li>:float</li>
200
- <li>:string</li>
201
- <li>:date</li>
202
- <li>:percentage</li>
203
- <li>:formula</li>
204
- <li>:time</li>
205
- </ul>
206
-
207
-
208
- <h3>Write access</h3>
209
-
210
-
211
- <p>Cells in a google spreadsheet can be read or written.</p>
212
-
213
-
214
- <p>To write to a cell use the method call:</p>
215
-
216
-
142
+ <li>:string</li>
143
+ <li>:date</li>
144
+ <li>:percentage</li>
145
+ <li>:formula</li>
146
+ <li>:time</li>
147
+ </ul>
148
+ <p>Numeric values are returned as type :float, the return value is a Ruby Float object (note: integer values like 42 are returned as 42.0 &#8211; not as a Fixnum 42 object).</p>
149
+ <p>String values are returned as type :string and Ruby String object.</p>
150
+ <p>Date values are returned as type :date and as a Ruby Date object.</p>
151
+ <p>Percentage are return as type :percentage and as Ruby Float object with the <br />
152
+ range from 0.0 to 1.0.</p>
153
+ <p>Formulas are returned as type :formula &#8211; the value of the cell is the computed<br />
154
+ value of this formula. The formula itself can be retrieved with the #formula<br />
155
+ method.</p>
156
+ <p>Time values are returned as type :time &#8211; the value of the cell are the seconds<br />
157
+ from midnight a a Fixnum object</p>
158
+ <h3>Write access</h3>
159
+ <p>Cells in a google spreadsheet can be read or written.</p>
160
+ <p>To write to a cell use the method call:</p>
217
161
  <pre>
218
162
  <code>
219
163
  oo.set_value(row, col, value)
220
164
  </code>
221
165
  </pre>
222
-
223
- <p>There is an example in the examples folder which illustrates write access.</p>
224
-
225
-
226
- <h3>Formulas</h3>
227
-
228
-
229
- <p>Formulas in Openoffice- and Google-Spreadsheets can be handled.</p>
230
-
231
-
232
- <p>oo.<strong>celltype</strong>(row,col) returns :formula if there is a formula in this cell.</p>
233
-
234
-
235
- <p>oo.<strong>formula?</strong>(row,col) returns true if there is a formula</p>
236
-
237
-
238
- <p>oo.<strong>formula</strong>(row,col) returns the formula in this cell in a string variable (like &#8221;=<acronym title="[.A1:.M13]">SUM</acronym>&#8221;).
239
- You can do whatever you want with this expression. Please note that the syntax of
240
- formulas might vary between different sort of spreadsheets. There is no conversion
241
- of the formula syntax.</p>
242
-
243
-
244
- <p>If there is no formula in this cell nil is returned.</p>
245
-
246
-
247
- <p>oo.<strong>cell</strong>(row,col) returns the computed result of the formula (as it was saved in the file, no recalculation is done in this Gem).</p>
248
-
249
-
250
- <p>oo.<strong>formulas</strong> returns all formulas in the selected spreadsheet in an array like this:</p>
251
-
252
-
166
+ <p>There is an example in the examples folder which illustrates write access.</p>
167
+ <h3>Formulas</h3>
168
+ <p>Formulas in Openoffice- and Google-Spreadsheets can be handled.</p>
169
+ <p>oo.<strong>celltype</strong>(row,col) returns :formula if there is a formula in this cell.</p>
170
+ <p>oo.<strong>formula?</strong>(row,col) returns true if there is a formula</p>
171
+ <p>oo.<strong>formula</strong>(row,col) returns the formula in this cell in a string variable (like &#8220;=<acronym title="[.A1:.M13]"><span class="caps">SUM</span></acronym>&#8221;).<br />
172
+ You can do whatever you want with this expression. Please note that the syntax of<br />
173
+ formulas might vary between different sort of spreadsheets. There is no conversion<br />
174
+ of the formula syntax.<br />
175
+ <br />
176
+ If there is no formula in this cell nil is returned.</p>
177
+ <p>oo.<strong>cell</strong>(row,col) returns the computed result of the formula (as it was saved in the file, no recalculation is done in this Gem).</p>
178
+ <p>oo.<strong>formulas</strong> returns all formulas in the selected spreadsheet in an array like this:</p>
253
179
  <pre>
254
180
  <code>
255
181
  [[1,2,"=SUM(.A1:.B1)"],
@@ -257,316 +183,177 @@ of the formula syntax.</p>
257
183
  [1,4,"=COS(.D4)"]]
258
184
  </code>
259
185
  </pre>
260
-
261
- <p>Each entry consists of the elements row, col, formula.</p>
262
-
263
-
264
- <p>Note: oo.<strong>cell</strong>(row,col) is the same for ordinary cells and formulas. So you can use the computated value of a formula. If you have to distinguish if a cell is a formula use #<strong>formula</strong>?</p>
265
-
266
-
267
- <p>Please note: formulas in Excel-Spreadsheets cannot be handled (this is another gem, see: &#8220;Thanks&#8221;)</p>
268
-
269
-
270
- <h3><span class="caps">YAML</span>-Output</h3>
271
-
272
-
273
- <p>You can generate <span class="caps">YAML</span>-Output from your spreadsheet data. The method is called:</p>
274
-
275
-
276
- <p>oo.to_yaml # =&gt; produces <span class="caps">YAML</span> output from the entire default spreadsheet
277
- oo.to_yaml({&#8220;myattribute1&#8221; =&gt; &#8220;myvalue1&#8221;, &#8220;myattribute2&#8221; =&gt; &#8220;myvalue2&#8221;)
278
- # =&gt; <span class="caps">YAML</span> output with additional attributes
186
+ <p>Each entry consists of the elements row, col, formula.</p>
187
+ <p>Note: oo.<strong>cell</strong>(row,col) is the same for ordinary cells and formulas. So you can use the computated value of a formula. If you have to distinguish if a cell is a formula use #<strong>formula</strong>?</p>
188
+ <p>Please note: formulas in Excel-Spreadsheets cannot be handled (this is another gem, see: &quot;Thanks&quot;)</p>
189
+ <h3><span class="caps">YAML</span>-Output</h3>
190
+ <p>You can generate <span class="caps">YAML</span>-Output from your spreadsheet data. The method is called:</p>
191
+ <p>oo.to_yaml # =&gt; produces <span class="caps">YAML</span> output from the entire default spreadsheet<br />
192
+ oo.to_yaml({&quot;myattribute1&quot; =&gt; &#8220;myvalue1&#8221;, &#8220;myattribute2&#8221; =&gt; &quot;myvalue2&quot;)<br />
193
+ # =&gt; <span class="caps">YAML</span> output with additional attributes<br />
279
194
  oo.to_yaml({..}, 2,10, 300,10) # =&gt; only the rectangle from row 2, column 10 to row 300, column 10 will be returned</p>
280
-
281
-
282
- <p>If you omit one or more parameters the maximum boundaries of your spreadsheet will be used.</p>
283
-
284
-
285
- <p>With the <span class="caps">YAML</span> output you can import your data in a Ruby on Rails application in a manner that spreadsheet data can accessed in a Rails application.</p>
286
-
287
-
288
- <p>This is not limited to a Rails application &#8211; you can also do further evaluations with your data.</p>
289
-
290
-
291
- <h3><span class="caps">CSV</span>-Output</h3>
292
-
293
-
294
- <p>You can generate output in csv-format with</p>
295
-
296
-
195
+ <p>If you omit one or more parameters the maximum boundaries of your spreadsheet will be used.</p>
196
+ <p>With the <span class="caps">YAML</span> output you can import your data in a Ruby on Rails application in a manner that spreadsheet data can accessed in a Rails application.</p>
197
+ <p>This is not limited to a Rails application &#8211; you can also do further evaluations with your data.</p>
198
+ <h3><span class="caps">CSV</span>-Output</h3>
199
+ <p>You can generate output in csv-format with</p>
297
200
  <pre>
298
201
  <code>
299
202
  oo.to_csv
300
203
  </code>
301
204
  </pre>
302
-
303
- <p>to write to the standard output or</p>
304
-
305
-
205
+ <p>to write to the standard output or</p>
306
206
  <pre>
307
207
  <code>
308
208
  oo.to_csv("somefile.txt")
309
209
  </code>
310
210
  </pre>
311
-
312
- <p>to write to a file.</p>
313
-
314
-
315
- <h3>Using MS-Excel spreadsheets</h3>
316
-
317
-
318
- <p>You can also access MS-Excel spreadsheat.</p>
319
-
320
-
321
- Replace Openoffice with
322
- <pre>
323
- <code>oo = Excel.new("simple_spreadsheet.xls").
324
-
325
- </code>
326
- </pre>
327
-
328
- <p>or Google.new() or Excelx.new().</p>
329
-
330
-
331
- All methode are the same for OpenOffice-, Excel- and Google-objects.
332
- <strike> The only difference
333
- is the setting of the default-worksheet. OpenOffice uses the name of the worksheet whereas Excel needs the index of the worksheet (1,2,3,..).
334
- </strike>
335
-
336
- <p>Formulas can only be handled in OpenOffice-, Excel .XLSX files and Google-spreadsheets.</p>
337
-
338
-
339
- <p>Features in OpenOffice/Excel/Google:</p>
340
-
341
-
342
- <table class="border:1px solid black">
343
- <tr>
344
- <td>feature</td>
345
- <td>Open Office</td>
346
- <td>Excel</td>
347
- <td>Google</td>
348
- <td>Excel .xlsx</td>
349
- </tr>
350
- <tr>
351
- <td>formulas</td>
352
- <td>yes</td>
353
- <td>no</td>
354
- <td>yes</td>
355
- <td>yes</td>
356
- </tr>
357
- <tr>
358
- <td>celltype</td>
359
- <td>:percentage</td>
360
- <td>:float</td>
361
- <td>:percentage</td>
362
- <td>:percentage</td>
363
- </tr>
364
- <tr>
365
- <td>access</td>
366
- <td>read-only</td>
367
- <td>read-only</td>
368
- <td>read and write</td>
369
- <td>read-only</td>
370
- </tr>
371
- </table>
372
-
373
-
374
-
375
-
376
- <p>The parseexcel-gem does not support the celltype &#8216;percentage&#8217; but uses &#8216;float&#8217; instead. This is not a big deal as you can also use &#8216;float&#8217; to do calculations with these cells.</p>
377
-
378
-
379
- <p>Old .sxc OpenOffice files are currently not supported &#8211; please load these files and save it as an &#8220;OpenDocument Spreadsheet (.ods)&#8221;.</p>
380
-
381
-
382
- <p>Instead of a filename the Google#new method needs the &#8216;key&#8217; of a Google-Spreadsheet. This key can be copied from the <span class="caps">URL</span> when you display a google spreadsheet with your browser.</p>
383
-
384
-
385
- <p>If you want to use Google spreadsheets you must either have set the
386
- environment variables &#8216;GOOGLE_MAIL&#8217; and &#8216;GOOGLE_PASSWORD&#8217; or you pass
211
+ <p>to write to a file.</p>
212
+ <h3>Using MS-Excel spreadsheets</h3>
213
+ <p>You can also access MS-Excel spreadsheat.</p>
214
+ <p>Replace Openoffice with <br />
215
+ <pre><br />
216
+ <code>oo = Excel.new("simple_spreadsheet.xls").</p>
217
+ <p></code><br />
218
+ </pre></p>
219
+ <p>or Google.new() or Excelx.new().</p>
220
+ <p>All methode are the same for OpenOffice-, Excel- and Google-objects.<br />
221
+ <strike> The only difference<br />
222
+ is the setting of the default-worksheet. OpenOffice uses the name of the worksheet whereas Excel needs the index of the worksheet (1,2,3,..).<br />
223
+ </strike></p>
224
+ <p>Formulas can only be handled in OpenOffice-, Excel .<span class="caps">XLSX</span> files and Google-spreadsheets.</p>
225
+ <p>Features in OpenOffice/Excel/Google:</p>
226
+ <table class="border:1px solid black">
227
+ <tr>
228
+ <td>feature</td>
229
+ <td>Open Office</td>
230
+ <td>Excel</td>
231
+ <td>Google</td>
232
+ <td>Excel .xlsx</td>
233
+ </tr>
234
+ <tr>
235
+ <td>formulas</td>
236
+ <td>yes</td>
237
+ <td>no</td>
238
+ <td>yes</td>
239
+ <td>yes</td>
240
+ </tr>
241
+ <tr>
242
+ <td>celltype</td>
243
+ <td>:percentage</td>
244
+ <td>:float</td>
245
+ <td>:percentage</td>
246
+ <td>:percentage</td>
247
+ </tr>
248
+ <tr>
249
+ <td>access</td>
250
+ <td>read-only</td>
251
+ <td>read-only</td>
252
+ <td>read and write</td>
253
+ <td>read-only</td>
254
+ </tr>
255
+ </table>
256
+ <p>The parseexcel-gem does not support the celltype &#8216;percentage&#8217; but uses &#8216;float&#8217; instead. This is not a big deal as you can also use &#8216;float&#8217; to do calculations with these cells.</p>
257
+ <p>Old .sxc OpenOffice files are currently not supported &#8211; please load these files and save it as an &#8220;OpenDocument Spreadsheet (.ods)&#8221;.</p>
258
+ <p>Instead of a filename the Google#new method needs the &#8216;key&#8217; of a Google-Spreadsheet. This key can be copied from the <span class="caps">URL</span> when you display a google spreadsheet with your browser.</p>
259
+ <p>If you want to use Google spreadsheets you must either have set the<br />
260
+ environment variables &#8216;GOOGLE_MAIL&#8217; and &#8216;GOOGLE_PASSWORD&#8217; or you pass<br />
387
261
  the Google-name and -password to the Google#new method.</p>
388
-
389
-
390
- <p>Setting these variables can be done if you add these lines to your
262
+ <p>Setting these variables can be done if you add these lines to your<br />
391
263
  ~/.bashrc (or similar setup file within other shells):</p>
392
-
393
-
394
- <pre><code>export GOOGLE_MAIL="yourname@gmail.com"
395
- export GOOGLE_PASSWORD="mysecretpassword"</code></pre>
396
-
397
-
398
- <p>This gem does not check if you are allowed to access a specific google spreadsheet. If it&#8217;s not your own spreadsheet or you are not allowed to read or wwrite to a spreadsheet the behaviour is not defined (but it will not work ;-) ).</p>
399
-
400
-
401
- <p>The default behavior at opening a spreadsheet with a certain extension has been
402
- changed.
403
- Say you&#8217;re trying to open a spreadsheet file with the extension .xls, which is normally
404
- an Excel file
405
- with the Openoffice.new() call. This cannot work, if the file is really an excel file &#8211; instead
264
+ export GOOGLE_MAIL=&#8220;yourname@gmail.com&#8221;
265
+ export GOOGLE_PASSWORD=&#8220;mysecretpassword&#8221;
266
+ <p>This gem does not check if you are allowed to access a specific google spreadsheet. If it&#8217;s not your own spreadsheet or you are not allowed to read or wwrite to a spreadsheet the behaviour is not defined (but it will not work ;-) ).</p>
267
+ <p>The default behavior at opening a spreadsheet with a certain extension has been <br />
268
+ changed.<br />
269
+ Say you&#8217;re trying to open a spreadsheet file with the extension .xls, which is normally<br />
270
+ an Excel file <br />
271
+ with the Openoffice.new() call. This cannot work, if the file is really an excel file &#8211; instead <br />
406
272
  you have to open it with the Excel.new() call.</p>
407
-
408
-
409
- <p>Now you&#8217;re getting an exception raised. Before it was was only a warning and the
273
+ <p>Now you&#8217;re getting an exception raised. Before it was was only a warning and the<br />
410
274
  access to this file failed.</p>
411
-
412
-
413
- <p>Theorectically you can have a file with the extension .xls which is in fact an Openoffice spreadsheet file.</p>
414
-
415
-
416
- <p>It&#8217;s possible to open such a file with the Openoffice class, but you have have to
417
- override the parameter &#8216;file_warning&#8217; in the new method:
418
- &#8216;Openoffice.new(&#8216;myfile.xls&#8217;, false, :warning)&#8217; or
419
- &#8216;Openoffice.new(&#8216;myfile.xls&#8217;, false, :ignore)&#8217;.</p>
420
-
421
-
422
- <p>If you set it to :warning you get a warning if you try to use a spreadsheet file with
423
- the &#8216;false&#8217; extension, but the
424
- program will try to handle the file with this class (of course this will fail, if the file
275
+ <p>Theorectically you can have a file with the extension .xls which is in fact an Openoffice spreadsheet file.</p>
276
+ <p>It&#8217;s possible to open such a file with the Openoffice class, but you have have to<br />
277
+ override the parameter &#8216;file_warning&#8217; in the new method: <br />
278
+ &#8216;Openoffice.new(&#8217;myfile.xls&#8217;, false, :warning)&#8217; or<br />
279
+ &#8216;Openoffice.new(&#8217;myfile.xls&#8217;, false, :ignore)&#8217;.</p>
280
+ <p>If you set it to :warning you get a warning if you try to use a spreadsheet file with <br />
281
+ the &#8216;false&#8217; extension, but the <br />
282
+ program will try to handle the file with this class (of course this will fail, if the file<br />
425
283
  is really of the false type).</p>
426
-
427
-
428
- <p>If you completely know what you are doing you can also disable the warning with the
284
+ <p>If you completely know what you are doing you can also disable the warning with the<br />
429
285
  parameter :ignore.</p>
430
-
431
-
432
- <h3>Accessing Spreadsheet over the Web</h3>
433
-
434
-
435
- You can even read openoffice or excel-spreadsheets from a http-address:
436
- <pre>
286
+ <h3>Accessing Spreadsheet over the Web</h3>
287
+ <p>You can even read openoffice or excel-spreadsheets from a http-address:<br />
288
+ <pre><br />
437
289
  <code>oo = Excel.new("http://www.somedomain.com/simple_spreadsheet.xls").
438
290
  oo = Openoffice.new("http://www.somedomain.com/simple_spreadsheet.ods").
439
- </code>
440
- </pre>
441
-
442
- or a zipped file:
443
- <pre>
291
+ </code><br />
292
+ </pre></p>
293
+ <p>or a zipped file:<br />
294
+ <pre><br />
444
295
  <code>oo = Excel.new("http://www.somedomain.com/simple_spreadsheet.xls.zip",:zip).
445
296
  oo = Openoffice.new("http://www.somedomain.com/simple_spreadsheet.ods.zip",:zip).
446
- </code>
447
- </pre>
448
-
449
- after working with a spreadsheet from the web you have to call
450
- <pre>
297
+ </code><br />
298
+ </pre></p>
299
+ <p>after working with a spreadsheet from the web you have to call <br />
300
+ <pre><br />
451
301
  <code>oo.remove_tmp
452
- </code>
453
- </pre>
454
-
455
- <p>to delete the temporary local copy of the spreadsheet file. If you don&#8217;t call
456
- this method you will have subdirectories names &#8216;oo_xxxxx&#8217; which you can remove manually.
457
- Calling remove_tmp is not the best solution to clean temporary files &#8211; i will
302
+ </code><br />
303
+ </pre></p>
304
+ <p>to delete the temporary local copy of the spreadsheet file. If you don&#8217;t call<br />
305
+ this method you will have subdirectories names &#8216;oo_xxxxx&#8217; which you can remove manually.<br />
306
+ Calling remove_tmp is not the best solution to clean temporary files &#8211; i will <br />
458
307
  provide a better solution in the next releases.</p>
459
-
460
-
461
- <h3>Remote Access</h3>
462
-
463
-
464
- <p>You can even access your spreadsheet data from a remote machine via <span class="caps">SOAP</span>. The examples directory shows a little example how to do this. If you like, you can extend these functions or restrict the access to certain cells.
308
+ <h3>Remote Access</h3>
309
+ <p>You can even access your spreadsheet data from a remote machine via <span class="caps">SOAP</span>. The examples directory shows a little example how to do this. If you like, you can extend these functions or restrict the access to certain cells. <br />
465
310
  Remote access with <span class="caps">SOAP</span> is nothing specific to roo, you can do this with every Rub object, but i thought it would nice to give an example what could be done with roo.</p>
466
-
467
-
468
- <h3>Excel spreadsheets / Openoffice spreadsheets / Google spreadsheets with Ruby on Rails</h3>
469
-
470
-
471
- <p>There is a simple helper method to display a spreadsheet at your application page:</p>
472
-
473
-
474
- <ul>
475
- <li>in your controller, add &#8220;require &#8216;roo&#8217;&#8221; and &#8221;@rspreadsheet = Openoffice.new(&#8220;numbers1.ods&#8221;)&#8221; or
476
- &#8221;@rspreadsheet = Openoffice.new(&#8220;http://www.somehost.com/data/numbers1.od s&#8221;)&#8221; to get access to your spreadsheet file</li>
477
- <li>use it in any view of your application with &#8221;&lt;%= spreadsheet @rspreadsheet, [&#8220;Tabelle&#8221;] %&gt;<br/>&#8221; or one of the following formats</li>
478
- </ul>
479
-
480
-
481
- <p><img src="Roo_Spreadsheets_Rails.png"></p>
482
-
483
-
484
- <h2>Where is it used?</h2>
485
-
486
-
487
- <p>How do you use roo? What are you doing with roo?</p>
488
-
489
-
490
- <ul>
311
+ <h3>Excel spreadsheets / Openoffice spreadsheets / Google spreadsheets with Ruby on Rails</h3>
312
+ <p>There is a simple helper method to display a spreadsheet at your application page:</p>
313
+ <ul>
314
+ <li>in your controller, add &#8220;require &#8216;roo&#8217;&#8221; and &#8220;@rspreadsheet = Openoffice.new(&#8221;numbers1.ods&quot;)&quot; or<br />
315
+ &#8220;@rspreadsheet = Openoffice.new(&#8221;http://www.somehost.com/data/numbers1.od s&quot;)&quot; to get access to your spreadsheet file</li>
316
+ <li>use it in any view of your application with &#8220;&lt;%= spreadsheet @rspreadsheet, [&#8221;Tabelle&quot;] %&gt;<br/>&quot; or one of the following formats</li>
317
+ </ul>
318
+ <p><img src="Roo_Spreadsheets_Rails.png"></p>
319
+ <h2>Where is it used?</h2>
320
+ <p>How do you use roo? What are you doing with roo?</p>
321
+ <ul>
491
322
  <li>The author of this gem uses roo for the generation of weekly reports which are (automatically) sent to his customers (Thomas Preymesser, Homepage: www.thopre.com, Blog: thopre.wordpress.com, email me: thopre@gmail.com)</li>
492
- </ul>
493
-
494
-
495
- <p>If you have an interesting application where you use roo then write me a short description of your project and i will publish it here (write, if your email-address should be published or not).</p>
496
-
497
-
498
- <p>Or you can write directly in the project wiki at <a href="http://roo.rubyforge.org/wiki/wiki.pl?Who's_Using_Roo">http://roo.rubyforge.org/wiki/wiki.pl?Who&#8217;s_Using_Roo</a></p>
499
-
500
-
501
- <p>If you don&#8217;t want to publish the details you can also write me an email and state, that it should not be published &#8211; i am just curious to hear, where it is used.</p>
502
-
503
-
504
- <h2>Documentation</h2>
505
-
506
-
507
- <p><a href="rdoc/index.html">rdoc</a></p>
508
-
509
-
510
- <h2>Tests and test data</h2>
511
-
512
-
513
- <p>There are many test files within the test directory. If you don&#8217;t want to run unit tests and don&#8217;t want the test data you can completely delete the &#8216;test&#8217; directory within the hierarchy of this gem.</p>
514
-
515
-
516
- <h2>Feature Requests / Bugs</h2>
517
-
518
-
519
- <p>Submit Feature Requests and bugs here: <a href="http://rubyforge.org/tracker/?group_id=3729">http://rubyforge.org/tracker/?group_id=3729</a></p>
520
-
521
-
522
- <h2>Forum</h2>
523
-
524
-
525
- <p>International Group:
323
+ </ul>
324
+ <p>If you have an interesting application where you use roo then write me a short description of your project and i will publish it here (write, if your email-address should be published or not).</p>
325
+ <p>Or you can write directly in the project wiki at <a href="http://roo.rubyforge.org/wiki/wiki.pl?Who&#39;s_Using_Roo">http://roo.rubyforge.org/wiki/wiki.pl?Who&#8217;s_Using_Roo</a></p>
326
+ <p>If you don&#8217;t want to publish the details you can also write me an email and state, that it should not be published &#8211; i am just curious to hear, where it is used.</p>
327
+ <h2>Documentation</h2>
328
+ <p><a href="rdoc/index.html">rdoc</a></p>
329
+ <h2>Tests and test data</h2>
330
+ <p>There are many test files within the test directory. If you don&#8217;t want to run unit tests and don&#8217;t want the test data you can completely delete the &#8216;test&#8217; directory within the hierarchy of this gem.<br />
331
+ <br />
332
+ h2. Feature Requests / Bugs</p>
333
+ <p>Submit Feature Requests and bugs here: <a href="http://rubyforge.org/tracker/?group_id=3729">http://rubyforge.org/tracker/?group_id=3729</a></p>
334
+ <h2>Forum</h2>
335
+ <p>International Group:<br />
526
336
  <a href="http://groups.google.com/group/ruby-roo">http://groups.google.com/group/ruby-roo</a></p>
527
-
528
-
529
- <p>Deutschsprachige Group:
337
+ <p>Deutschsprachige Group:<br />
530
338
  <a href="http://groups.google.com/group/ruby-roo-de">http://groups.google.com/group/ruby-roo-de</a></p>
531
-
532
-
533
- <h2>Wiki</h2>
534
-
535
-
536
- <p><a href="http://roo.rubyforge.org/wiki/wiki.pl">http://roo.rubyforge.org/wiki/wiki.pl</a></p>
537
-
538
-
539
- <h2>How to submit patches</h2>
540
-
541
-
542
- <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
543
-
544
-
545
- <strike>The trunk repository is <code>svn://rubyforge.org/var/svn/gorank/trunk</code> for anonymous access.</strike>
546
-
547
- <h2>License</h2>
548
-
549
-
550
- <p>This code is free to use under the terms of Ruby</p>
551
-
552
-
553
- <h2>Contact</h2>
554
-
555
-
556
- <p>Comments are welcome. Send an email to <a href="mailto:thopre@gmail.com">Thomas Preymesser</a>.</p>
557
-
558
-
559
- <h2>Thanks</h2>
560
-
561
-
562
- <ul>
339
+ <h2>Wiki</h2>
340
+ <p><a href="http://roo.rubyforge.org/wiki/wiki.pl">http://roo.rubyforge.org/wiki/wiki.pl</a></p>
341
+ <h2>How to submit patches</h2>
342
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
343
+ <p><strike>The trunk repository is <code>svn://rubyforge.org/var/svn/gorank/trunk</code> for anonymous access.</strike></p>
344
+ <h2>License</h2>
345
+ <p>This code is free to use under the terms of Ruby</p>
346
+ <h2>Contact</h2>
347
+ <p>Comments are welcome. Send an email to <a href="mailto:thopre@gmail.com">Thomas Preymesser</a>.</p>
348
+ <h2>Thanks</h2>
349
+ <ul>
563
350
  <li><a href="http://rubyforge.org/users/nicwilliams/">Dr Nic Williams</a> for his wonderful gem &#8216;<a href="http://rubyforge.org/projects/newgem/">newgem</a>&#8217; which makes it very convenient to create, manage and publish Ruby gems</li>
564
- <li>for the Excel-part the <a href="http://rubyforge.org/projects/spreadsheet/">spreadsheet</a> gem is used. My functions are a convenient wrapper around the functions of this gem</li>
565
- <li>Dirk Huth f&uuml;rs Testen unter Windows</li>
566
- <li>Thanks to davecahill for a bug-fix patch within the google part</li>
567
- </ul>
351
+ <li>for the Excel-part the <a href="http://rubyforge.org/projects/spreadsheet/">spreadsheet</a> gem is used. My functions are a convenient wrapper around the functions of this gem</li>
352
+ <li>Dirk Huth f&uuml;rs Testen unter Windows</li>
353
+ <li>Thanks to davecahill for a bug-fix patch within the google part</li>
354
+ </ul>
568
355
  <p class="coda">
569
- <a href="mailto:thopre@gmail.com">Thomas Preymesser</a>, 17th July 2008<br>
356
+ <a href="mailto:thopre@gmail.com">Thomas Preymesser</a>, 18th August 2008<br>
570
357
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
571
358
  </p>
572
359
  </div>