Guest User

Untitled

a guest
Dec 9th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ExcelAddress _formatRangeAddress = new ExcelAddress("J2:J"+(listaMargenes.Count+2));
  2. string _statement="IF(OFFSET(J3,0,-1)-J3>0,1,0)";
  3. var _cond4 = hoja.ConditionalFormatting.AddExpression(_formatRangeAddress);
  4. _cond4.Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
  5. _cond4.Style.Fill.BackgroundColor.Color = System.Drawing.Color.Red;
  6. _cond4.Formula = _statement;
  7.  
  8. IF(OFFSET(J3,0,-1)-J3>0,1,0)
  9.  
  10. if(J3<0)
  11.  
  12. string _statement = "if(B3<0, 1)";
Add Comment
Please, Sign In to add comment