lib/roo/excel.rb in roo-0.8.5 vs lib/roo/excel.rb in roo-0.9.0

- old
+ new

@@ -93,25 +93,10 @@ new_str += "\000" end new_str end - # sets the working sheet (1,2,3,..) - def default_sheet=(n) - if n.kind_of?(Fixnum) - # - elsif n.kind_of?(String) - raise RangeError if ! self.sheets.include?(n) - # parseexcel supports now the name of a sheet - else - raise TypeError, "what are you trying to set as default sheet?" - end - @default_sheet = n - @first_row[n] = @last_row[n] = @first_column[n] = @last_column[n] = nil - @cells_read[n] = false - end - # returns the content of a cell. The upper left corner is (1,1) or ('A',1) def cell(row,col,sheet=nil) sheet = @default_sheet unless sheet row,col = normalize(row,col) worksheet = @workbook.worksheet(sheet_no(sheet)) @@ -265,14 +250,9 @@ def formulas(sheet=nil) raise EXCEL_NO_FORMULAS end private - - # check if default_sheet was set - def default_sheet_check - raise ArgumentError, "Error: default_sheet not set" if @default_sheet == nil - end # determine the first and last boundaries def get_firsts_lasts(sheet=nil) sheet = @default_sheet unless sheet fr = fc = 999_999