title: Handle #REF! cell from excel using apache poi
body: <p>I need to handle #REF! cell from my excel, where ever I get #REF! I need to return 0 or Empty quotes to the datastructure. 
  I tried doing this but I'm not able to succeed, here is the snippet:-</p>
  
  <pre><code>if (valueCell.getCellType() == Cell.CELL_TYPE_FORMULA) {
                  if (valueCell.getCellStyle().getDataFormatString().contains("%")) {
                      // Detect Percent Values
                        values.put(valueHeader, String.valueOf(Double.valueOf(valueCell.getNumericCellValue() * 100).intValue()) + "%");
  
                  }else if (valueCell.getCellType() == Cell.CELL_TYPE_ERROR) {
                      values.put(valueHeader,"");
                  } else {
                        values.put(valueHeader,String.valueOf(valueCell.getNumericCellValue()));
  
                  }
              }
  </code></pre>
  
  <p>It's not going into that else if condition. And it throws </p>
  
  <blockquote>
    <p>Cannot get a NUMERIC value from a STRING cell</p>
  </blockquote>
  
  <p>Please help me with this.</p>