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

前端 未结 5 1574
梦谈多话
梦谈多话 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条回答
  •  不要未来只要你来
    2021-02-09 13:48

    Well, you could check for null before your switch statement, or you could change which call to row.getCell you make. Checking the Javadoc for POI there are 2 forms, the first is what you are using, the second has an additional parameter, of the type Row.MissingCellPolicy, where you can pass a value that would automagically transform null cells into blanks.

提交回复
热议问题