diff --git a/ClosedXML_Examples/ConditionalFormatting/ConditionalFormatting.cs b/ClosedXML_Examples/ConditionalFormatting/ConditionalFormatting.cs index d87a082..70d8f24 100644 --- a/ClosedXML_Examples/ConditionalFormatting/ConditionalFormatting.cs +++ b/ClosedXML_Examples/ConditionalFormatting/ConditionalFormatting.cs @@ -1,6 +1,5 @@ -using System; using ClosedXML.Excel; - +using System; namespace ClosedXML_Examples { @@ -27,7 +26,6 @@ public class CFColorScaleLowHigh : IXLExample { - public void Create(String filePath) { var workbook = new XLWorkbook(); @@ -221,7 +219,6 @@ } } - public class CFEqualsString : IXLExample { public void Create(String filePath) @@ -539,13 +536,9 @@ .CellBelow().SetValue(2) .CellBelow().SetValue(3); - byte[] bytes = new byte[16]; - BitConverter.GetBytes(1).CopyTo(bytes, 0); - var guid = new Guid(bytes); - - var conditionalFormat = ws.RangeUsed().AddConditionalFormat(); - //conditionalFormat.Id = string.Concat("{", guid.ToString(), "}"); - conditionalFormat.DataBar(XLColor.Green, XLColor.Red, false) + ws.RangeUsed() + .AddConditionalFormat() + .DataBar(XLColor.Green, XLColor.Red, showBarOnly: false) .LowestValue() .Maximum(XLCFContentType.Percent, "100"); @@ -614,7 +607,6 @@ range.AddConditionalFormat().WhenEquals("1").Font.SetBold(); range.InsertRowsAbove(1); - workbook.SaveAs(filePath); } } @@ -660,4 +652,4 @@ workbook.SaveAs(filePath); } } -} +} \ No newline at end of file