public void inboundTrainInfoOutput(){
		try {
			jxl.Workbook readWorkBook = jxl.Workbook.getWorkbook(new File("outputFile.xls"));   //唯讀的Excel工作薄物件
			jxl.write.WritableWorkbook writeWorkBook = Workbook.createWorkbook(new File("outputFile.xls"), readWorkBook);   //要寫入的路徑以及檔名
			jxl.write.WritableSheet writeSheet = writeWorkBook.createSheet("inbound_train_info", 1);   //建立一個工作表名字，然後0表示為第一頁

			Label label = new Label(0, 0, "Inbound Train No");   //設一個label, 並添加(column major)
			writeSheet.addCell(label);   //將格子添加到表格
			writeSheet.addCell(new Label(1, 0, "Day No"));
			writeSheet.addCell(new Label(2, 0, "Arriving time at receiving area"));
			writeSheet.addCell(new Label(3, 0, "Receiving track No"));
			writeSheet.addCell(new Label(4, 0, "Number of blocks"));
			writeSheet.addCell(new Label(5, 0, "Number of cars"));
			writeSheet.addCell(new Label(6, 0, "Destination of blocks (number of cars)"));
			writeSheet.addCell(new Label(7, 0, "Starting time of humping job"));
			writeSheet.addCell(new Label(8, 0, "Ending time of humping job"));
			
			BlockValues b = new BlockValues();   //輸出block values用
			
			for(int i=0, x=1; i<finishTrain.size() ; i++, x++){   //輸入每一筆火車的資料
				writeSheet.addCell(new Label(0, x, finishTrain.get(i).inBoundTrainId));   //寫入火車編號
				writeSheet.addCell(new Label(1, x, finishTrain.get(i).day));   //寫入到達日
				writeSheet.addCell(new Label(2, x, finishTrain.get(i).arrivalTime));   //寫入到達時間
				writeSheet.addCell(new Label(3, x, finishTrain.get(i).receivingTrackNo));   //寫入receiving track No
							
				Integer numberOfBlocks=0;   //block種類數量
				//Integer numberOfCars=0;   //car總數量
				String tmpString = new String("");   //儲存輸出用destination of blocks
				for(int j=0 ; j<b.blockLength ; j++){   //寫入車廂種類數量
					int c = Integer.parseInt(countBlocks(b.blockValues[j], finishTrain.get(i)));
					if(c!=0){
						numberOfBlocks++;
						//numberOfCars+=c;
						tmpString+=b.blockValues[j] + "(" + c + ");";
					}
				}
				writeSheet.addCell(new Label(4, x, numberOfBlocks.toString()));
				writeSheet.addCell(new Label(5, x, String.valueOf(finishTrain.get(i).inBoundBlock.size())));
				writeSheet.addCell(new Label(6, x, tmpString));
				writeSheet.addCell(new Label(7, x, String.valueOf(finishTrain.get(i).currentTime)));
				writeSheet.addCell(new Label(8, x, String.valueOf(finishTrain.get(i).currentTime + 
						(Constants.HUMP_RATE*(1.0f*finishTrain.get(i).inBoundBlock.size())))));
			}
			label = null;
			writeWorkBook.write();   //最後的最後，在一次將資料寫入檔案內即可，這是一次性寫入，第二次寫入會無效
			writeWorkBook.close();   //關檔是好習慣
			readWorkBook.close();   //關檔是好習慣
		} catch (IOException e) {
			e.printStackTrace();
		} catch (RowsExceededException e) {		
			e.printStackTrace();
		} catch (WriteException e) {
			e.printStackTrace();
		} catch (BiffException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}