I am trying to read an excel file from
java class. But it is taking more than 20 mins to read the file. Please help me in this issue. I am placing my code below
-------------------------------CODE------------------------------
WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(new Locale("en", "EN"));
Workbook workbook = Workbook.getWorkbook(file, ws);
Sheet s = workbook.getSheet(0);
System.out.println("Initial read Excel Return 3333333");
int rows = s.getRows();
for (int i = 0; i < rows; i++) {
System.out.println("000");
Cell c = (Cell) s.getCell(0, i);
if(c != null && c.getContents() != null && !(c.getContents().trim().equals(""))){
XLDataBean bean = new XLDataBean();
bean.setRefNo(c.getContents());
c = (Cell) s.getCell(1, i);
bean.setTrackingNo(c.getContents());
c = (Cell) s.getCell(2, i);
bean.setUrl(c.getContents());
c = (Cell) s.getCell(3, i);
bean.setDisDate(c.getContents());
list.add(bean);
}else{
break;
}
}
-------------------------------------CODE----------------------------------
Regards
Pooja D