diff --git a/components/fpspreadsheet/source/common/xlsxooxml.pas b/components/fpspreadsheet/source/common/xlsxooxml.pas index be40f64a1..dbd8e7c72 100644 --- a/components/fpspreadsheet/source/common/xlsxooxml.pas +++ b/components/fpspreadsheet/source/common/xlsxooxml.pas @@ -1118,7 +1118,10 @@ begin s := GetAttrValue(ANode, 'rgb'); if s <> '' then begin - Result := HTMLColorStrToColor('#' + s); + if s[1] = '#' then + Result := HTMLColorStrToColor(s) + else + Result := HTMLColorStrToColor('#' + s); exit; end;