diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/XLWorkbook_Load.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/XLWorkbook_Load.cs index 54309a7..a5daeea 100644 --- a/ClosedXML/ClosedXML/ClosedXML/Excel/XLWorkbook_Load.cs +++ b/ClosedXML/ClosedXML/ClosedXML/Excel/XLWorkbook_Load.cs @@ -909,6 +909,9 @@ { if (fillSource.PatternFill.PatternType != null) fill.PatternType = fillSource.PatternFill.PatternType.Value.ToClosedXml(); + else + fill.PatternType = XLFillPatternValues.Solid; + if (fillSource.PatternFill.ForegroundColor != null) fill.PatternColor = GetColor(fillSource.PatternFill.ForegroundColor); if (fillSource.PatternFill.BackgroundColor != null) @@ -1284,9 +1287,9 @@ foreach (var sor in conditionalFormatting.SequenceOfReferences.Items) { - var conditionalFormat = new XLConditionalFormat(ws.Range(sor.Value)); foreach (var fr in conditionalFormatting.Elements()) { + var conditionalFormat = new XLConditionalFormat(ws.Range(sor.Value)); if (fr.FormatId != null) { LoadFont(differentialFormats[(Int32) fr.FormatId.Value].Font, conditionalFormat.Style.Font); @@ -1347,10 +1350,8 @@ } } } - + ws.ConditionalFormats.Add(conditionalFormat); } - - ws.ConditionalFormats.Add(conditionalFormat); } }