code: public static Workbook getWorkbook(File file) throws IOException
      {
          Workbook ret = null;
          String lowerFilename = file.getName().toLowerCase();
          if(lowerFilename.endsWith("."+CommonFiles.XLS_EXT))
          {
              ret = XlsWorkbook.getWorkbook(file);
          }
          else if(lowerFilename.endsWith("."+CommonFiles.XLSX_EXT))
          {
              XlsxWorkbook.initJaxbContexts();
              ret = XlsxWorkbook.getWorkbook(file);
          }
          return ret;
      }
docs: Returns an existing workbook object.
  @param file The file with the name of the workbook
  @return The existing workbook object
  @throws IOException if the file cannot be opened