From cbc35cb1c3ca4ab31f648ab22f88aa40fddf883f Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 26 Mar 2017 11:23:43 +0000 Subject: [PATCH] fpspreadsheet: Fix exporter writing ftFloat fields as currency cells (http://forum.lazarus.freepascal.org/index.php/topic,36321.msg241946 - patch by forum user "paweld") git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5818 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/export/fpsexport.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/source/export/fpsexport.pas b/components/fpspreadsheet/source/export/fpsexport.pas index bc16ff8e1..b6f53f7f9 100644 --- a/components/fpspreadsheet/source/export/fpsexport.pas +++ b/components/fpspreadsheet/source/export/fpsexport.pas @@ -301,7 +301,9 @@ begin FSheet.WriteBlank(FRow, EF.Index) else if Field.Datatype in (IntFieldTypes+[ftAutoInc,ftLargeInt]) then FSheet.WriteNumber(FRow, EF.Index,Field.AsInteger) - else if Field.Datatype in [ftBCD,ftCurrency,ftFloat,ftFMTBcd] then + else if Field.Datatype in [ftBCD,ftFloat,ftFMTBcd] then + FSheet.WriteNumber(FRow, EF.Index, Field.AsFloat) + else if Field.Datatype in [ftCurrency] then FSheet.WriteCurrency(FRow, EF.Index, Field.AsFloat) else if Field.DataType in [ftString,ftFixedChar] then FSheet.WriteText(FRow, EF.Index, Field.AsString)