建立excel文件的過程(須要jxl.jar包,附件裏有):ide
- File file = new File("D:/test.xls");
- WritableWorkbook workbook = (WritableWorkbook)Workbook.createWorkbook(file);
- WritableSheet sheet = workbook.createSheet("Test Result", 0);
- Label label = new Label(0, 0, "URL");
- sheet.addCell(label);
- workbook.write();
- workbook.close();