ActiveReports 6 Online Help
NumberFormat Property
Example 

Sets or returns an Excel-style number format string.
Syntax
'Declaration
 
Public Property NumberFormat As String
public string NumberFormat {get; set;}

Property Value

String.
Remarks
For foreign currency symbols such as the Japanese Yen you can use a format such as: "[$¥-0]#,##0.00". Replace the Yen sign (¥) with whatever currency symbol you want to use.
Example
sb.Sheets[0].Cell(0,0).Alignment = DataDynamics.SpreadBuilder.Style.HorzAlignments.Right;
sb.Sheets[0].Cell(0,0).BorderBottomColor = System.Drawing.Color.Red;
sb.Sheets[0].Cell(0,0).BorderBottomStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double;
sb.Sheets[0].Cell(0,0).BorderDiagonalColor = System.Drawing.Color.Red;
sb.Sheets[0].Cell(0,0).BorderDiagonalEnum = DataDynamics.SpreadBuilder.Style.BorderDiagonalStyles.Both;
sb.Sheets[0].Cell(0,0).BorderDiagonalStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Hair;
sb.Sheets[0].Cell(0,0).BorderLeftColor = System.Drawing.Color.Red;
sb.Sheets[0].Cell(0,0).BorderLeftStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double;
sb.Sheets[0].Cell(0,0).BorderRightColor = System.Drawing.Color.Red;
sb.Sheets[0].Cell(0,0).BorderRightStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double;
sb.Sheets[0].Cell(0,0).BorderTopColor = System.Drawing.Color.Red;
sb.Sheets[0].Cell(0,0).BorderTopStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double;
sb.Sheets[0].Cell(0,0).FillColor = System.Drawing.Color.Gray;
sb.Sheets[0].Cell(0,0).FontBold = true;
sb.Sheets[0].Cell(0,0).FontItalic = true;
sb.Sheets[0].Cell(0,0).FontName = "Times New Roman";
sb.Sheets[0].Cell(0,0).FontSize = 14;
sb.Sheets[0].Cell(0,0).FontUnderlineStyle = DataDynamics.SpreadBuilder.Style.FontUnderlineStyles.Single;
sb.Sheets[0].Cell(0,0).ForeColor = System.Drawing.Color.Blue;
sb.Sheets[0].Cell(0,0).Hyperlink = "www.datadynamics.com";
sb.Sheets[0].Cell(0,0).NumberFormat = "[$¥-0]#,##0.00";
sb.Sheets[0].Cell(0,0).TextAngle = 255;
sb.Sheets[0].Cell(0,0).VertAlignment = DataDynamics.SpreadBuilder.Style.VertAlignments.Top;
sb.Sheets[0].Cell(0,0).WrapText = true;
With sb.Sheets(0).Cell(0, 0)
    .Alignment = DataDynamics.SpreadBuilder.Style.HorzAlignments.Right
    .BorderBottomColor = System.Drawing.Color.Red
    .BorderBottomStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double
    .BorderDiagonalColor = System.Drawing.Color.Red
    .BorderDiagonalEnum = DataDynamics.SpreadBuilder.Style.BorderDiagonalStyles.Both
    .BorderDiagonalStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Hair
    .BorderLeftColor = System.Drawing.Color.Red
    .BorderLeftStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double
    .BorderRightColor = System.Drawing.Color.Red
    .BorderRightStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double
    .BorderTopColor = System.Drawing.Color.Red
    .BorderTopStyle = DataDynamics.SpreadBuilder.Style.BorderLineStyle.Double
    .FillColor = System.Drawing.Color.Gray
    .FontBold = True
    .FontItalic = True
    .FontName = "Times New Roman"
    .FontSize = 14
    .FontUnderlineStyle = DataDynamics.SpreadBuilder.Style.FontUnderlineStyles.Single
    .ForeColor = System.Drawing.Color.Blue
    .Hyperlink = "www.datadynamics.com"
    .NumberFormat = "[$¥-0]#,##0.00"
    .TextAngle = 255
    .VertAlignment = DataDynamics.SpreadBuilder.Style.VertAlignments.Top
    .WrapText = True
End With
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DDCell Class
DDCell Members

Send Feedback