0

我正在使用 HSSFCell 获取 excel 表的列索引。这是代码

                     if(cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) 
                {
                    int index =  cell.getColumnIndex();

                    System.out.println(" The rowvalue is Numeric so Moving ahead");
                    String str = String.valueOf(cell.getNumericCellValue());
                    System.out.println(" String ---->"+str);

                    list1.add(str);

                }.

错误存在于 getColoumnIndex 行。我添加了 jakarta.poi.jar 。该错误表明 HSSFCell 不存在方法 getColoumnIndex。请 7 rg

4

0 回答 0