internal static void SetConditionalFormatting(IXLCell cell) { cell.CellLeft(1); var formula = $"={cell.Address}<>{cell.CellLeft(1).Address}"; cell.AddConditionalFormat().WhenIsTrue(formula) .Fill.SetBackgroundColor(XLColor.FromHtml("#FFC1B4")); }
public static IXLCell SetGreenIfEqualToPrevious(this IXLCell cell) { cell.CellLeft(1); var formula = $"={cell.Address}={cell.CellLeft(1).Address}"; cell.AddConditionalFormat().WhenIsTrue(formula) .Fill.SetBackgroundColor(XLColor.FromHtml("#B4FFC8")); return(cell); }
public static IXLCell SetRedIfFalse(this IXLCell cell) { cell.CellLeft(1); var formula = $"={cell.Address}=False"; cell.AddConditionalFormat().WhenIsTrue(formula) .Fill.SetBackgroundColor(XLColor.FromHtml("#FFC1B4")); return(cell); }