Excel Export Number Format.

14 views
Skip to first unread message

Syed Saif

unread,
May 27, 2024, 6:28:41 AMMay 27
to Rosi Delphi Components
Dear Tomas.

I am exporting TrdbGrid Data into Excel using.TrXLSExport.

You can see 1st Column - Actual data is  776419799999 but in Excel its shows  
7.7642E+11. I can change manual in excel Number format and then it works fine. Do we have any option in Component to to format and then export . I am using below Option   XLSExp.ExportDBTable(ThisActiveGrid,True)  ;

Thanks
Syed 









ExcelNo.jpg

Tomas Rosinsky

unread,
May 27, 2024, 3:02:21 PMMay 27
to Rosi Delphi Components
Hi Syed, 
ExportDBTable function uses DisplayFormat set for each field.
So you can easily set your field setting:
YourDataset.fieldByName('AWb').DisplayFormat := '0';

I hope it helps
Tomas
Dne pondělí 27. května 2024 v 12:28:41 UTC+2 uživatel saift...@gmail.com napsal:
Reply all
Reply to author
Forward
0 new messages