diff --git a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
index e9d6940ec..c5c817026 100644
--- a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
+++ b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
@@ -14,9 +14,6 @@
-
-
-
diff --git a/components/fpspreadsheet/xlsbiff8.pas b/components/fpspreadsheet/xlsbiff8.pas
index 11398b0f3..78b72dbaf 100755
--- a/components/fpspreadsheet/xlsbiff8.pas
+++ b/components/fpspreadsheet/xlsbiff8.pas
@@ -1421,7 +1421,7 @@ begin
end else
cell := FWorksheet.AddCell(ARow, ACol);
- FWorksheet.WriteText(cell, FSharedStringTable[SSTIndex]);
+ FWorksheet.WriteText(cell, FSharedStringTable.Strings[SSTIndex]);
{ Add attributes }
ApplyCellFormatting(cell, XF);
@@ -1429,6 +1429,7 @@ begin
{ Add rich text formatting }
ms := TMemoryStream(FSharedStringTable.Objects[SSTIndex]);
if ms <> nil then begin
+ ms.Position := 0;
n := WordLEToN(ms.ReadWord);
SetLength(rtParams, n);
ms.ReadBuffer(rtParams[0], n*SizeOf(TsRichTextParam));