GUIDE.md in rspreadsheet-0.2.12 vs GUIDE.md in rspreadsheet-0.2.14
- old
+ new
@@ -5,28 +5,28 @@
````ruby
@workbook = Rspreadsheet.open('./test.ods')
````
and access its first sheet like this
````ruby
-@sheet = @workbook.worksheets(1)
+@sheet = @workbook.worksheet(1)
````
### Accessing cells
you can get and set contents of cells using "verbatim" syntax like
````ruby
-@sheet.rows(5).cells(4).value
-@sheet.rows(5).cells(4).value = 10
+@sheet.row(5).cell(4).value
+@sheet.row(5).cell(4).value = 10
````
or using "brief" syntax like
````ruby
@sheet[5,4]
@sheet[5,4] = 10
````
You can mix these two at will, for example like this
````ruby
-@row = @sheet.rows(5)
+@row = @sheet.row(5)
@row[4] = 10
````
## Examples
@@ -35,7 +35,8 @@
## Conventions
* **all indexes are 1-based**. This applies to rows, cells cordinates, and all array like structures like list od worksheets etc. Spreadsheet world is 1-based, ruby is 0-based do I had to make a decision. I intend to make an global option for this, but in early stage I need to keep things simple.
* with numeric coordinates row always comes before col as in (row,col)
* with alphanumerical col always comes before row as in F12
- * Shorter syntax worksheet[x,y] returns value, longer syntax worksheet.cells(x,y) return cell objects. This allows to work conviniently with values using short syntax and access the cell object if needed (to access formatting for example).
+ * Shorter syntax worksheet[x,y] returns value, longer syntax worksheet.cell(x,y) return cell objects. This allows to work conviniently with values using short syntax and access the cell object if needed (to access formatting for example).
+ * Note: currently plural and singular like sheet/sheets, row/rows, cell/cells can be used intergangebly, but there is a (discussion)[https://github.com/gorn/rspreadsheet/issues/10] about this and in future versions we might use singular style for methods and plural for array style.