Alternative to deprecated getCellType

后端 未结 8 2283
自闭症患者
自闭症患者 2020-11-27 05:44

I\'m reading an excel-file (file extension xlsx) using org.apache.poi 3.15.

This is my code:

try (FileInputStream fileInputStream = new FileInputStr         


        
8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 06:19

    Use getCellType()

    switch (cell.getCellType()) {
       case BOOLEAN :
                     //To-do
                     break;
       case NUMERIC:
                     //To-do
                     break;
       case STRING:
                     //To-do
                     break;
    }
    

提交回复
热议问题