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();
}
即可。