Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: empty String.
<p>This is My code:</p>

<pre><code>      Workbook workbook = new Workbook();
        workbook.open(filename);
        Worksheet worksheet = workbook.getWorksheets().getSheet(sheetno);
        Cells cells=worksheet.getCells();
        int num=cells.getMaxDataRow();
        int num1=cells.getMaxDataColumn();
        int OCount=1;
                     for (int n1=startpos+1;n1&lt;endpos;n1++)
         {   if (cells.checkCell(n1, Colno).getValue()==null )
                       {         Cell cell=cells.getCell(n1,Colno);
                                Style style = cells.getCell( n1,Colno).getStyle();
                                style.setColor(Color.TEAL);
                                cell.setStyle(style);
                       } else if(cells.checkCell(n1, Colno).getValue().toString().length()==0) { Cell cell=cells.getCell(n1,Colno);
                                Style style = cells.getCell( n1,Colno).getStyle();
                                style.setColor(Color.TEAL);
                                cell.setStyle(style); } else{ double intCounter = Double.parseDouble(cells.checkCell(n1,Colno).getValue().toString());
                          System.out.println(cells.checkCell(n1,Colno).getValue().toString());
                          if(intCounter!=Count){
                                       Cell cell=cells.getCell(n1,Colno);
                                        Style style = cells.getCell( n1,Colno).getStyle();
                                        style.setColor(Color.YELLOW);
                                        cell.setStyle(style);
                                  }
                              }
                  Count=Count+1;

             } workbook.save("C:\\output.xls",FileFormatType.EXCEL97TO2003);                                                                                   
</code></pre>

<p>I am trying to check that Sr no is in sequential order or not. it is working fine if there is no empty string " ". For empty string it throws</p>

<p><strong>Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: empty String.</strong></p>

<p>Thanks in Advance.... </p>
