FileInputStream fis=new
FileInputStream("E:\\test.xlsx");
Workbook wb=new WorkbookFactory.create(fis);
Sheet s=wb.geSheet("Sheetname");
int rowcount=s.getLastRowNum();
for(int j=0;j<rowcount;j++){
Row r =s.getRow(j);
int columncount=r.getLastCellNum();
for(int a=0;a<columcount;a++){
Cell c=r.getCell(a);
String s=c .getStringCellValue();
System.out.println(s);
}
0 comments:
Post a Comment