// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); //Range A1's displaying color is table style worksheet.getTables().add(worksheet.getRange("A1:E5"), true); Color color_A1 = worksheet.getRange("A1").getDisplayFormat().getInterior().getColor(); //Range A1's displaying color will be cell style, yellow. worksheet.getRange("A1").getInterior().setColor(Color.GetYellow()); Color color_A1_1 = worksheet.getRange("A1").getDisplayFormat().getInterior().getColor(); //Range A1's displaying color will be conditional format style, green. IFormatCondition condition = (IFormatCondition) worksheet.getRange("A1").getFormatConditions().add(FormatConditionType.NoBlanksCondition); condition.getInterior().setColor(Color.GetGreen()); Color color_A1_2 = worksheet.getRange("A1").getDisplayFormat().getInterior().getColor(); // Save to an excel file workbook.save("GetDisplayFormat.xlsx");