Spreadsheet Integrator - Online Help
Available for:
Spreadsheet Integrator
Questions / Feedback?

CellFormat Property

The number or date format of the cell.

Syntax

[VB.NET]
Public Property CellFormat As String

[C#]
public string CellFormat {get; set;}

Remarks

This property gets or sets the format for the cell. This is only applicable when CellType is set to 1 (ctNumber). This is used to specify both number and date formats. See the table below for possible values.

Type Format Cell Value Cell Text
General 0 1234 1234
Number 0.0 1234 1234.0
0.00 1234 1234.00
#,##0 1234 1,234
#,##0.00 1234 1,234.00
Currency "$"#,##0 1234 $1,234
"$"#,##0.O 1234 $1,234.0
"$"#,##0.00;[Red]"$"#,##0.00 1234 $1,234.00
"$"#,##0_);\("$"#,##0\) 1234 $1,234
"$"#,##0_);[Red]\("$"#,##0\) 1234 $1,234
"$"#,##0.00_);\("$"#,##0.00\) 1234 $1,234.00
"$"#,##0.00_);[Red]\("$"#,##0.00\) 1234 $1,234.00
Accounting _("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"?_);_(@_) 1234 $1,234
_("$"* #,##0.00_;_("$"* \(#,##0.00\);_("$"* "-"?_);_(@_)1234 $1,234.00
Percentage 0% 0.1234 12%
0.0% 0.1234 12.3%
0.00% 0.1234 12.34%
Fraction # ?/? 0.1234 1/8
# ??/?? 0.1234 10/81
#\ ???/??? 0.1234 106/859
#\ ?/2 0.1234 0
#\ ?/4 0.1234 0
#\ ?/8 0.1234 1/8
#\ ??/16 0.1234 2/16
#\ ?/10 0.1234 1/10
#\ ??/100 0.1234 12/100
Scientific 0.00E+00 0.1234 1.23E-01
##0.0E+0 0.1234 123.4E-3
Special 00000 123 00123
00000\-0000 123122 00012-3122
[<=9999999]###\-####;\(###\)\ ###\-#### 1298452314 (129)845-2314
000\-00\-0000 1298452314 1298-45-2314
Time h:mm AM/PM 41645.65 3:36 PM
h:mm:ss AM/PM 41645.65 3:36:00 PM
h:mm 41645.65 15:36
h:mm:ss 41645.65 15:36:00
m/d/yyyy h:mm 41645.65 1/7/2014 15:36
[$-F400]h:mm:ss\ AM/PM 41645.65 3:36:00 PM
h:mm;@ 41645.65 15:36
[$-409]h:mm\ AM/PM;@ 41645.65 3:36 PM
h:mm:ss;@ 41645.65 15:36:00
[$-409]h:mm:ss\ AM/PM;@ 41645.65 15:36:00 PM
mm:ss.0;@ 41645.65 36:00.0
[h]:mm:ss;@ 41645.65 999519:36:00
Date m/d/yyyy 41646 1/7/2014
d-mmm-yy 41646 7-Jan-14
d-mmm 41646 7-Jan
mmm-yy 41646 Jan-14
[$-F800]dddd\,\ mmmm\ dd\,\ yyyy 41645.65 Tuesday,January 07,2014
m/d;@ 41645.65 1/7
m/d/yy;@ 41645.65 1/7/14
mm/dd/yy;@ 41645.65 01/07/14
[$-409]d\-mmm;@ 41645.65 7-Jan
[$-409]d\-mmm\-yy;@ 41645.65 7-Jan-14
[$-409]mmm\-yy;@ 41645.65 Jan-14
[$-409]mmmm\-yy;@ 41645.65 January-14
[$-409]mmmm\ d\,\ yyyy;@ 41645.65 January 7,2014
[$-409]m/d/yy\ h:mm\ AM/PM;@ 41645.65 1/7/14 3:36 PM
m/d/yy\ h:mm;@ 41645.65 1/7/14 15:36
[$-409]mmmmm;@ 41645.65 J
[$-409]mmmmm\-yy;@ 41645.65 J-14
m/d/yyyy;@ 41645.65 1/7/2014
[$-409]d\-mmm\-yyyy;@ 41645.65 7-Jan-2014
Text @ 41645.65 41645.65

This property is not available at design time.

Default Value

"0"

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0