81,122
社区成员




private String dateFromExcel(Cell cell){
String data = cell.getContents();
if (data.toString().trim().equals("")){
return "";
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (cell.getType() == CellType.DATE) {
DateCell dc=(DateCell)cell;
data=sdf.format(dc.getDate());
}else{
data = data.toString().trim();
}
return data;
}
InputStream is = new FileInputStream(strFilePath);
rwb = Workbook.getWorkbook(is);
Sheet rs = rwb.getSheet(0);
Cell cell = rs.getCell(j,i);
String strCellData = cell.getContents();