lib/rspreadsheet/worksheet.rb in rspreadsheet-0.1.0 vs lib/rspreadsheet/worksheet.rb in rspreadsheet-0.1.1
- old
+ new
@@ -21,11 +21,11 @@
@xmlnode['table:name'] = xmlnode_or_sheet_name
else raise 'Provide name or xml node to create a Worksheet object'
end
## initialize rows
- @spredsheetrows=RowArray.new(@xmlnode)
+ @spredsheetrows=RowArray.new(self,@xmlnode)
end
def cells(r,c)
rows(r).andand.cells(c)
end
def nonemptycells
@@ -34,13 +34,13 @@
def rows(rowi)
@spredsheetrows.get_row(rowi)
end
## syntactic sugar follows
def [](r,c)
- cells(r,c).value
+ cells(r,c).andand.value
end
def []=(r,c,avalue)
- cells(r,c).value=avalue
+ cells(r,c).andand.value=avalue
end
# allows syntax like sheet.F15
def method_missing method_name, *args, &block
if method_name.to_s.match(/^([A-Z]{1,3})(\d{1,8})(=?)$/)
row,col = Rspreadsheet::Tools.convert_cell_address($~[1],$~[2])