Home > Back-end >  TADVStringGrid export to EXCEL format
TADVStringGrid export to EXCEL format

Time:09-20

Novice, forget temporarily suspended
When I use TAdvStringGrid controls, no data can be normal import, export and found abnormal format, for example: import the text data of "1630001000000105269967", after the export in EXCEL is shown as "1.6300010000001 e+21", could you tell me how to control the export to EXCEL format, such as to make the imported into EXCEL data format text data is still?

CodePudding user response:

This is derived for Float type, you should be changed to text type export,

Numerical results, it is your values beyond the range of Float type, adopts scientific memory method is derived,

CodePudding user response:

How can I export to text types, thank you,

This problem bothering me for several years,

CodePudding user response:

The default is to put the pure digital characters as digital processing, can control digital display formats:
NumberFormat Sheet. Cells [1, 1]='# 0.0000;
Frame:
Sheet [1, 1] Borders. Graphics.linestyle:=XXXXX
Horizontal alignment:
HorizontalAlignment Sheet [1, 1]=XXXX
XXX values can be look at Delphi ExcelXP. Pas unit (a type library, Delphi has imported)

Control of excel, word, the Internet a lot

CodePudding user response:

For I:=1 to lCols do
The begin
//@ to leave a space between the back of the single quotes can be
//FApp. Columns [I] NumberFormat:='@'; Will show 64, need to click to display the correct xe2, delphi7 not
AExcel. Application. The Columns [I] NumberFormat:='@';
end;
  • Related