diff --git a/ClosedXML/Excel/XLWorkbook_Load.cs b/ClosedXML/Excel/XLWorkbook_Load.cs index 6df9e8e..c515d2d 100644 --- a/ClosedXML/Excel/XLWorkbook_Load.cs +++ b/ClosedXML/Excel/XLWorkbook_Load.cs @@ -1721,12 +1721,16 @@ { if (openXMLFill.PatternFill.BackgroundColor != null) closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.BackgroundColor); + else + closedXMLFill.BackgroundColor = XLColor.FromIndex(64); } else { // yes, source is foreground! if (openXMLFill.PatternFill.ForegroundColor != null) closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.ForegroundColor); + else + closedXMLFill.BackgroundColor = XLColor.FromIndex(64); } break; @@ -1736,6 +1740,8 @@ if (openXMLFill.PatternFill.BackgroundColor != null) closedXMLFill.BackgroundColor = GetColor(openXMLFill.PatternFill.BackgroundColor); + else + closedXMLFill.BackgroundColor = XLColor.FromIndex(64); break; } } diff --git a/ClosedXML_Tests/Resource/Other/StyleReferenceFiles/TransparentBackgroundFill/TransparentBackgroundFill.xlsx b/ClosedXML_Tests/Resource/Other/StyleReferenceFiles/TransparentBackgroundFill/TransparentBackgroundFill.xlsx index 6953f33..8d63ec0 100644 --- a/ClosedXML_Tests/Resource/Other/StyleReferenceFiles/TransparentBackgroundFill/TransparentBackgroundFill.xlsx +++ b/ClosedXML_Tests/Resource/Other/StyleReferenceFiles/TransparentBackgroundFill/TransparentBackgroundFill.xlsx Binary files differ