//设置单元格的颜色为灰色
jxl.write.WritableCellFormat colorFormat = new jxl.write.WritableCellFormat(
wfc);
colorFormat.setBackground(Colour.DARK_GREEN);
colorFormat.setBorder(Border.ALL, BorderLineStyle.THIN);
sheet.getWritableCell(0, 3).setCellFormat(colorFormat);
sheet.getWritableCell(0, 4).setCellFormat(colorFormat);
sheet.getWritableCell(0, 5).setCellFormat(colorFormat);
sheet.getWritableCell(0, 6).setCellFormat(colorFormat);
sheet.getWritableCell(3, 3).setCellFormat(colorFormat);
sheet.getWritableCell(3, 4).setCellFormat(colorFormat);
sheet.getWritableCell(3, 5).setCellFormat(colorFormat);
sheet.getWritableCell(3, 6).setCellFormat(colorFormat);
sheet.mergeCells(0, 7, 4, 7);
jxl.write.WritableFont wfc1 = new jxl.write.WritableFont(
WritableFont.ARIAL, 10, WritableFont.BOLD, false,
UnderlineStyle.NO_UNDERLINE, jxl.format.Colour.BLACK);
jxl.write.WritableCellFormat colorCenterFormat = new jxl.write.WritableCellFormat(
wfc1);
colorCenterFormat.setBackground(Colour.DARK_GREEN);
colorCenterFormat.setAlignment(Alignment.CENTRE);
colorCenterFormat.setWrap(true);
jxl.write.WritableCellFormat colorFormat = new jxl.write.WritableCellFormat(
wfc);
colorFormat.setBackground(Colour.DARK_GREEN);
colorFormat.setBorder(Border.ALL, BorderLineStyle.THIN);
sheet.getWritableCell(0, 3).setCellFormat(colorFormat);
sheet.getWritableCell(0, 4).setCellFormat(colorFormat);
sheet.getWritableCell(0, 5).setCellFormat(colorFormat);
sheet.getWritableCell(0, 6).setCellFormat(colorFormat);
sheet.getWritableCell(3, 3).setCellFormat(colorFormat);
sheet.getWritableCell(3, 4).setCellFormat(colorFormat);
sheet.getWritableCell(3, 5).setCellFormat(colorFormat);
sheet.getWritableCell(3, 6).setCellFormat(colorFormat);
sheet.mergeCells(0, 7, 4, 7);
jxl.write.WritableFont wfc1 = new jxl.write.WritableFont(
WritableFont.ARIAL, 10, WritableFont.BOLD, false,
UnderlineStyle.NO_UNDERLINE, jxl.format.Colour.BLACK);
jxl.write.WritableCellFormat colorCenterFormat = new jxl.write.WritableCellFormat(
wfc1);
colorCenterFormat.setBackground(Colour.DARK_GREEN);
colorCenterFormat.setAlignment(Alignment.CENTRE);
colorCenterFormat.setWrap(true);