title: XLS - Conditional Formatting - Java POI Example
body: <p>:) 
  Finally after the research I found the solution to my problem, which is not yet satisfied</p>
  
  <p>I would like to use conditional formatting to show a line with a yellow color if column B and C to the same line does not have the same value.
  this is the marco on VBA I'm not using it just for help me undrstund </p>
  
  <pre><code>    For i = 3 To fin Step 1
          Range("C" &amp; i).Select
          Selection.FormatConditions.Delete
          Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlNotEqual, _
              Formula1:="=B" &amp; i
          Selection.FormatConditions(1).Interior.ColorIndex = 6
  </code></pre>
  
  <p>this is My Methode java .it is like this But </p>
  
  <pre><code>FileInputStream file = new FileInputStream(new File("D://DEQ//"+selectitem.getRefDeq()+"//Comparatif.xls"));        
          HSSFWorkbook workbook1 = new HSSFWorkbook(file);
          HSSFSheet sheet1 = workbook1.getSheet("page1");
                  HSSFSheetConditionalFormatting cf =sheet1.getSheetConditionalFormatting();
          HSSFConditionalFormattingRule cfrole=cf.createConditionalFormattingRule(org.apache.poi.hssf.record.CFRuleRecord.ComparisonOperator.NOT_EQUAL, "120");
  
          HSSFPatternFormatting fill_pattern = cfrole.createPatternFormatting();
          fill_pattern.setFillBackgroundColor(IndexedColors.YELLOW.index);
  
          CellRangeAddress[] my_data_range = {CellRangeAddress.valueOf("B17:B26")};
          cf.addConditionalFormatting(my_data_range,cfrole);
  FileOutputStream out = new FileOutputStream(new File("D://DEQ//"+selectitem.getRefDeq()+"//Comparatif.xls"));
          workbook1.write(out);
          out.close();
  </code></pre>
  
  <p>this example work well it shows me the yellow colored line. but as you've already seen I have values ​​that are a = 120 which is displayed with the color yellow. problem is that I think the values ​​are not in the digital format in my page .. this is not a problem</p>
  
  <p>My real problem is the value that I have to comprare with, I do not know how I have expressed that each box B and C of the same line.
    I put here a single value = 120 only for test</p>
  
  <p>How should I do .. at the value comprarer
  thank you in advance :)</p>