lib/UniSheet.rb
#Find number of sheets if xls or xlsx file
Find number of sheets if xls or xlsx file
Find number of sheets if xls or xlsx file
def n_sheets()
    if @file_type == "xls"
      return @excel_book.sheet_count
     elsif @file_type == "xlsx"
       return @xlsx_book.worksheets.size
     else
       raise RuntimeError, "File #{@file_name} is not an xls or xlsx file, so has only one sheet"
    end
  end
def n_sheets ( ) if @file_type == "xls" return @excel_book . sheet_count elsif @file_type == "xlsx" return @xlsx_book . worksheets . size else raise RuntimeError , "File #{@file_name} is not an xls or xlsx file, so has only one sheet" end end
Find number of sheets if xls or xlsx file
Find number of sheets if xls or xlsx file