日期:2014-05-20 浏览次数:20926 次
public static void main(String[] args) throws Exception{
InputStream inp = new FileInputStream("C:\\Documents and Settings\\pKF58059\\桌面\\TestCaseAlloc\\TEST\\aa.csv");
Workbook wb = WorkbookFactory.create(inp);
Sheet sheet = wb.getSheetAt(0);
System.out.println(sheet.getFirstRowNum());
System.out.println(sheet.getLastRowNum());
for(int i = sheet.getFirstRowNum(); i <= sheet.getLastRowNum(); i++){
Row row = sheet.getRow(i);
Cell cell = row.getCell(3);
Date date = cell.getDateCellValue();
System.out.println(date);
}
}
//打印结果
0
0
Sat Apr 07 00:00:00 CST 2012