public static void writeResult2Xls(ArrayList<ExamItem> eiAList, int outputPanelTablecolumnCount){
		try {
			//write Result to xls.
			WritableWorkbook workbook = Workbook.createWorkbook(new File("监考安排表.xls"));
			WritableSheet sheet = workbook.createSheet("First Sheet", 0);
			
			//打印表头
			Label labelKeyTiltle = new Label(0, 0, "考试编号"); 
			sheet.addCell(labelKeyTiltle);
			Label labelCourseNameTiltle = new Label(1, 0, "考试课程名称");
			sheet.addCell(labelCourseNameTiltle);
			Label labelDeptTiltle = new Label(2, 0, "开课系");
			sheet.addCell(labelDeptTiltle);
			Label labelCatTiltle = new Label(3, 0, "课程类别");
			sheet.addCell(labelCatTiltle);
			Label labelExamRoomTiltle = new Label(4, 0, "考场");
			sheet.addCell(labelExamRoomTiltle);
			Label labelMntrCountTiltle = new Label(5, 0, "所需监考老师数量");
			sheet.addCell(labelMntrCountTiltle);
			//打印监考老师表头
			if ( outputPanelTablecolumnCount > 6) {
				for(int i = 0; i < outputPanelTablecolumnCount - 6; i++){
					Label labelMonitorIndex = new Label(i+6, 0, "监考老师 - " + (i+1));
					sheet.addCell(labelMonitorIndex);
				}
			}
			
			//从第2行（index为1）开始输出，共输出eiarrlist.size() - 1  行
			for(int i = 1; i <= eiAList.size() ; i++ ) {
					Label labelKey = new Label(0, i, eiAList.get(i-1).getKey()); 
					sheet.addCell(labelKey);
					Label labelCourseName = new Label(1, i, eiAList.get(i-1).getCourseName());
					sheet.addCell(labelCourseName);
					Label labelDept = new Label(2, i, eiAList.get(i-1).getDepartment());
					sheet.addCell(labelDept);
					Label labelCat = new Label(3, i, eiAList.get(i-1).getCategory());
					sheet.addCell(labelCat);
					Label labelExamRoom = new Label(4, i, eiAList.get(i-1).getExamRoom());
					sheet.addCell(labelExamRoom);
					Number numberMntrCount = new Number(5, i, eiAList.get(i-1).getMonitorCount());
					sheet.addCell(numberMntrCount);
					//Here write the MonitorArrayList
					int j = 6;
					for(Monitor mntr: eiAList.get(i - 1).getResultMonitorArrList()){
						Label labelMonitorName = new Label(j++, i, mntr.getName());
						sheet.addCell(labelMonitorName);
					}
					
			}
			
			// All sheets and cells added. Now write out the workbook
			workbook.write(); 
			workbook.close();
			
		} catch (IOException e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, "文件导出失败，请重试", 
											"发生错误", JOptionPane.ERROR_MESSAGE);
		} catch (WriteException e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(null, "文件导出失败，请重试", 
											"发生错误", JOptionPane.ERROR_MESSAGE);
		}
	}