diff --git a/components/fpspreadsheet/source/common/xlsxml.pas b/components/fpspreadsheet/source/common/xlsxml.pas index 2b42bb6dc..73c1de8a1 100644 --- a/components/fpspreadsheet/source/common/xlsxml.pas +++ b/components/fpspreadsheet/source/common/xlsxml.pas @@ -3068,6 +3068,7 @@ var deffnt, fnt: TsFont; s, fmtVert, fmtHor, fmtWrap, fmtRot: String; nfp: TsNumFormatParams; + nfs: String; fill: TsFillPattern; cb: TsCellBorder; cbs: TsCellBorderStyle; @@ -3168,8 +3169,9 @@ begin begin nfp := book.GetNumberFormat(fmt^.NumberFormatIndex); nfp.AllowLocalizedAMPM := false; // Replace "AMPM" by "AM/PM" + nfs := nfp.NumFormatStr; AppendToStream(AStream, Format(INDENT3 + - '' + LF, [UTF8TextToXMLText(nfp.NumFormatStr)])); + '' + LF, [nfs])); // Do not UTF8TextToXMLText(nfs) because of '%' end; // Background