FileInputStream
fis=new FileInputStream ("E://data.xlsx");
Workbook wb=WorkbookFactory.create(fis);
Sheet s=wb.getSheet("test");//sheet name
int rc=s.getlastRowNum();
for(int i=0;i<=rc;i++)
{
Row r=s.getRow(i);
}
int cc=r.getlastCellNum();
for(int j=0;j<cc;j++){
Cell c=r.getCell(j);
String v=c.getStringcellvalue();
System.out.print(v);
}
0 comments:
Post a Comment