lib/roo/google.rb in roo-1.9.1 vs lib/roo/google.rb in roo-1.9.2

- old
+ new

@@ -93,12 +93,10 @@ read_cells(sheet) unless @cells_read[sheet] row,col = normalize(row,col) value = @cell[sheet]["#{row},#{col}"] if celltype(row,col,sheet) == :date begin - $log.debug "cell() value: #{value} @date_format: #{@date_format}" - $log.debug "returns #{Date.strptime(value, @date_format).inspect}" return Date.strptime(value, @date_format) rescue ArgumentError raise "Invalid Date #{sheet}[#{row},#{col}] #{value} using format '{@date_format}'" end elsif celltype(row,col,sheet) == :datetime @@ -250,24 +248,18 @@ # 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) - $log.debug "sheet: #{sheet}" - $log.debug "sheet_no: #{sheet_no}" ws = @worksheets[sheet_no] - $log.debug "#{ws.inspect}" for row in 1..ws.num_rows for col in 1..ws.num_cols key = "#{row},#{col}" string_value = ws.input_value(row,col) # item['inputvalue'] || item['inputValue'] numeric_value = ws[row,col] #item['numericvalue'] || item['numericValue'] (value, value_type) = determine_datatype(string_value, numeric_value) @cell[sheet][key] = value unless value == "" or value == nil - if value_type == :date - $log.debug "date erkannt. value: #{value}" - end @cell_type[sheet][key] = value_type @formula[sheet] = {} unless @formula[sheet] @formula[sheet][key] = string_value if value_type == :formula ############ #$log.debug("key: #{key}") @@ -302,10 +294,10 @@ val = timestring_to_seconds(val) else ty = :string end end - $log.debug "val: #{val} ty: #{ty}" if ty == :date + #$log.debug "val: #{val} ty: #{ty}" if ty == :date return val, ty end def add_to_cell_roo(row,col,value, sheet_no=1) sheet_no -= 1 \ No newline at end of file