Cell cell=workbook.getSheetAt(1).getRow(2).getCell(30);
public class AnalyzeExcel {
public static void main(String args[]) throws FileNotFoundException, IOException {
XSSFWorkbook wb = new XSSFWorkbook("D:/TA/Weeky.xlsx");
XSSFSheet sheet = wb.getSheetAt(0);
int totalRows = sheet.getLastRowNum();
for (int i=0; i<=totalRows; i++) {
XSSFRow row = sheet.getRow(i);
System.out.println(row.getCell(1).toString()
);
}
}
}
或者换个java jdk试试