public void testReadByPoi() throws IOException{
//创建对象
Workbook wb = new XSSFWorkbook("test.xlsx");
//调用get方法
Sheet sheet = wb.getSheetAt(0);
Row row = sheet.getRow(1);
Cell cell = row.getCell(2);
//都是get
double numericCellValue = cell.getNumericCellValue();
//注意get的数据类型 不匹配就拿不到
System.out.println(numericCellValue);
wb.close();
}
原文:https://www.cnblogs.com/KingAndPig/p/13738825.html