title: Type mismatch: cannot convert from HSSFWorkbook to Workbook
body: <p>I have the below code.</p>
  
  <pre><code>Workbook srcWorkBook;
  Workbook tgtWorkbook;
  if((src.substring(src.lastIndexOf("."),src.length()).equals(".xlsx"))){
      srcWorkBook=new XSSFWorkbook(excelFileSrc);
  }else{
      srcWorkBook=new HSSFWorkbook(excelFileSrc);
  }
  </code></pre>
  
  <p>It is running properly through standalone file, But during my ant compile it is throwing error</p>
  
  <pre><code> [javac] found   : org.apache.poi.hssf.usermodel.HSSFWorkbook
   [javac] required: org.apache.poi.ss.usermodel.Workbook
  </code></pre>
  
  <p>I checked my classpath and it does not have any duplicate instances of Jars. Please help</p>