title: Duplicate Conditional formatting with POI libraries
body: <p>I am facing some issues when applying some conditional formatting to an Excel document using POI java library. I am trying to highlight duplicate text values.The below code works properly except for fact that the rule format is not set. When I open the excel document, I see that the rule has been added (<a href="http://i.stack.imgur.com/3mkDr.png" rel="nofollow">Screen shot of new rule</a>) but that no format/color has been assigned to it.</p>
  
  <pre><code>public void conditionalFormatting() throws Exception {
  /* Read Workbook and Identify Color Scale Range */ 
  
      sheet = wb.getSheetAt(0);
      List&lt;String&gt; my_range = new ArrayList&lt;&gt;();
      my_range.add("F2:F" + (rowIndex + 1));
  
  /* Add Conditional Formatting Rule */
      CTConditionalFormatting colorScale = sheet.getCTWorksheet().addNewConditionalFormatting();
      colorScale.setSqref(my_range); // Attach Range to conditional formatting set
      CTCfRule myCFRule = colorScale.addNewCfRule(); //create a rule
      myCFRule.setType(STCfType.DUPLICATE_VALUES); // set type of rule to Colour Scale
      myCFRule.setPriority(1); // rule priority = 1
  }
  </code></pre>
  
  <p>Does anyone know how to add a format/color to the rule?</p>
  
  <p>Regards, T. Lecoffre</p>