Font ztFont = workbook.createFont();
ztFont.setItalic(ztFont2.getItalic());
if (srcCellType == Cell.CELL_TYPE_STRING) {
if("版本号:".equals(cell2.getStringCellValue())|| "合同
号:".equals(cell2.getStringCellValue())){
System.out.println((IndexedColors.BLUE.getIndex()));
ztFont.setColor(IndexedColors.BLUE.getIndex());
}else{
ztFont.setColor(ztFont2.getColor());
}
}else{
ztFont.setColor(ztFont2.getColor());
}.
对两个excel的字体设置颜色是.都设置为blue.得到的字体颜色却不一样.