website/index.txt in roo-0.3.0 vs website/index.txt in roo-0.4.0
- old
+ new
@@ -91,17 +91,44 @@
Formulas in Openoffice-Spreadsheets can be handled.
oo.celltype(row,col) returns :formula if there is a formula in this cell.
-oo.formula(row,col) returns the formula in this cell in a string variable.
-If there is no formula in this cell nil is return
+oo.formula?(row,col) returns true if there is a formula
+oo.formula(row,col) returns the formula in this cell in a string variable (like "=SUM([.A1:.M13])"). You can do whatever you want with this expression.
+If there is no formula in this cell nil is returned.
+
oo.cell(row,col) returns the computed result of the formula (as it was saved in the file, no recalculation is done in this Gem).
+oo.formulas returns all formulas in the selected spreadsheet in an array like this:
+
+ [[1,2,"=SUM(.A1:.B1)"],
+ [1,3,"=SIN(.C3)"],
+ [1,4,"=COS(.D4)"]]
+
+Each entry consists of the elements row, col, formual.
+
+Note: oo.cell(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 #formula?
+
Please note: formulas in Excel-Spreadsheets cannot be handled (this is another gem, see: "Thanks")
+h3. YAML-Output
+
+You can generate YAML-Output from your spreadsheet data. The method is called:
+
+oo.to_yaml # => produces YAML output from the entire default spreadsheet
+oo.to_yaml({"myattribute1" => "myvalue1", "myattribute2" => "myvalue2")
+ # => YAML output with additional attributes
+oo.to_yaml({..}, 2,10, 300,10) # => only the rectangle from row 2, column 10 to row 300, column 10 will be returned
+
+If you omit one or more parameters the maximum boundaries of your spreadsheet will be used.
+
+With the YAML output you can import your data in a Ruby on Rails application in a manner that spreadsheet data can accessed in a Rails application.
+
+This is not limited to a Rails application - you can also do further evaluations with your data.
+
h3. Using MS-Excel spreadsheets
You can also access MS-Excel spreadsheat.
Replace Openoffice with
@@ -109,20 +136,34 @@
<code>oo = Excel.new("simple_spreadsheet.xls").
</code>
</pre>
-all methode are the same for OpenOffice and Excel-objects. The only difference
+All methode are the same for OpenOffice and Excel-objects. The only difference
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,..).
-Formulas cannot be handled in Excel-spreadsheets.
+Formulas can only be handled in OpenOffice-spreadsheets.
+Features in OpenOffice and Excel:
+table(border:1px solid black).
+|feature|Open Office|Excel|
+|default_sheet|as name|as number|
+|formulas|yes|no|
+|to_yaml|yes|yes|
+
+
h2. Where is it used?
How do you use roo? What are you doing with roo?
+* 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)
+
+
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).
+
+Or you can write directly in the project wiki at "http://roo.rubyforge.org/wiki/wiki.pl?Who's_Using_Roo":http://roo.rubyforge.org/wiki/wiki.pl?Who's_Using_Roo
+
If you don't want to publish the details you can also write me an email and state, that it should not be published - i am just curious to hear, where it is used.
h2. Documentation