Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxSpreadSheetCustomDataFormat.FormatCodeID Property

Specifies the format of a value stored by a cell object.

#Declaration

Delphi
property FormatCodeID: Integer read; write;

#Property Value

Type
Integer

#Remarks

Assign a hexadecimal format code to this property to assign the required predefined format to a cell object’s value. The following table lists available format name strings, similar to those found in Microsoft Excel®, along with their respective hexadecimal codes:

Hexadecimal Code Format Name (Pattern) Cell Format Code (The CELL function result)
$00 GENERAL “G”
$01 0 “F0”
$02 0.00 “,0”
$03 #,##0 “F2”
$04 #,##0.00 “,2”
$05 $#,##0_);($#,##0) “C0”
$06 $#,##0_);[Red]($#,##0) “C0-“
$07 $#,##0.00_);($#,##0.00) “C2”
$08 $#,##0.00_);[Red]($#,##0.00) “C2-“
$09 0% “P0”
$0a 0.00% “P2”
$0b 0.00E+00 “S2”
$0c # ?/? “G”
$0d # ??/?? “G”
$0e m/d/yy “D4”
$0f d-mmm-yy “D1”
$10 d-mmm “D2”
$11 mmm-yy “D3”
$12 h:mm AM/PM “D7”
$13 h:mm:ss AM/PM “D6”
$14 h:mm “D9”
$15 h:mm:ss “D8”
$16 m/d/yy h:mm “D4”
$25 #,##0_);(#,##0)
$26 #,##0_);[Red](#,##0)
$27 #,##0.00_);(#,##0.00)
$28 #,##0.00_);[Red](#,##0.00)
$29 (* #,##0);(* (#,##0);(* “-“);(@_)
$2a ($* #,##0);($* (#,##0);($* “-“);
$2b (* #,##0.00);(* (#,##0.00);(* “-“??);(@_)
$2c ($* #,##0.00);($* (#,##0.00);($* “-“??);(@)
$2d mm:ss
$2e [h]:mm:ss
$2f mm:ss.0
$30 ##0.0E+0
$31 @

To assign a cell data format by using the format name string, use the FormatCode property instead.

End-users can assign the required data format mode to the currently selected cells by clicking the corresponding line in the Custom category displayed on the Format Cells dialog’s Number tab.

See Also