How to read Excel cell having null values too in Java…?

前端 未结 5 1481
梦谈多话
梦谈多话 2021-02-09 13:17

I\'m using Apache POI 3.6. I\'ve a column which is blank. I would like to be able to read it and then move to the next column. Even if I could resolve the

5条回答
  •  旧时难觅i
    2021-02-09 13:42

    I've finally got what I want. I thank mezmo for it. I want to share the exact code snippet to be changed. Just replace the line having :

    HSSFCell cell = row.getCell(c);
    

    with

    HSSFCell cell=row.getCell(c, org.apache.poi.ss.usermodel.Row.CREATE_NULL_AS_BLANK );
    

提交回复
热议问题