lib/roo/google.rb in roo-1.2.0 vs lib/roo/google.rb in roo-1.2.1
- old
+ new
@@ -160,10 +160,11 @@
# * :string
# * :date
# * :percentage
# * :formula
# * :time
+ # * :datetime
def celltype(row, col, sheet=nil)
sheet = @default_sheet unless sheet
read_cells(sheet) unless @cells_read[sheet]
row,col = normalize(row,col)
if @formula[sheet]["#{row},#{col}"]
@@ -319,9 +320,10 @@
private
# read all cells in a sheet
def read_cells(sheet=nil)
sheet = @default_sheet unless sheet
+ raise RangeError, "illegal sheet <#{sheet}>" unless sheets.index(sheet)
sheet_no = sheets.index(sheet)+1
doc = @gs.fulldoc(sheet_no)
(doc/"gs:cell").each {|item|
row = item['row']
col = item['col']