How to determine empty row?

后端 未结 9 1914
情书的邮戳
情书的邮戳 2020-12-23 10:18

How I can determine empty rows in .xls documents using Apache POI?

9条回答
  •  被撕碎了的回忆
    2020-12-23 10:28

    get the instance of CellReference and use formatAsString() on the instance. compare it with an empty String

    `

    if("".equals(cellRef.formatAsString())){
         System.out.println("this is an empty cell");
       }else{
          System.out.println("Cell value : "+cellRef.formatAsString());
       }
    

    ` Reference : http://www.javabeat.net/2007/10/apache-poi-reading-excel-sheet-using-java/

提交回复
热议问题