Spread ASP.NET 6.0 Product Documentation
NumberFormat Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > GeneralCellType Class : NumberFormat Property


Glossary Item Box

Gets or sets a NumberFormatInfo which is used to format the numeric value, such as for currency.

Syntax

Visual Basic (Declaration) 
Public Overridable Property NumberFormat As NumberFormatInfo
Visual Basic (Usage)Copy Code
Dim instance As GeneralCellType
Dim value As NumberFormatInfo
 
instance.NumberFormat = value
 
value = instance.NumberFormat
C# 
public virtual NumberFormatInfo NumberFormat {get; set;}

Property Value

NumberFormatInfo object containing information for formatting numeric values

Example

C#Copy Code
FarPoint.Web.Spread.GeneralCellType g = new FarPoint.Web.Spread.GeneralCellType();
System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
nfi.NumberDecimalDigits = 3;
nfi.NumberDecimalSeparator = ",";
g.NumberFormat = nfi;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g;
FpSpread1.ActiveSheetView.Cells[0, 0].Value = 234.56;
Visual BasicCopy Code
Dim g As New FarPoint.Web.Spread.GeneralCellType
Dim nfi As New System.Globalization.NumberFormatInfo
nfi.NumberDecimalDigits = 3
nfi.NumberDecimalSeparator = ","
g.NumberFormat = nfi
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = g
FpSpread1.ActiveSheetView.Cells(0, 0).Value = 234.56

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.