ExcelSheet = ExcelBook.getSheet(SheetName);

Cell = ExcelSheet.getRow(RowNum).getCell(ColNum);

String cellData = Cell.getStringCellValue();

报非法参数错误。

String无法获取一个数值类型

修改代码

String cellData = null;
ExcelSheet = ExcelBook.getSheet(SheetName);
Cell = ExcelSheet.getRow(RowNum).getCell(ColNum);
if (Cell != null) {
  Cell.setCellType(Cell.CELL_TYPE_STRING);
      cellData = Cell.getStringCellValue();
}

即可。

相关文章:

  • 2022-02-09
  • 2021-10-26
  • 2021-07-07
  • 2021-12-16
  • 2021-09-19
  • 2021-08-12
  • 2021-07-21
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2021-04-19
  • 2021-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-09-29
相关资源
相似解决方案