Syncfusion.XlsIO.Base
Example 


NumberFormatLocal Property

Returns or sets the format code for the object as a string in the language of the user. Read / write String.
Syntax
'Declaration
 
Property NumberFormatLocal As String
'Usage
 
Dim instance As IExtendedFormat
Dim value As String
 
instance.NumberFormatLocal = value
 
value = instance.NumberFormatLocal
string NumberFormatLocal {get; set;}
Example
The following code illustrates how to set NumberFormatLocal property of a IStyle.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Set text
            worksheet["C2"].Value = "1200.40";
            worksheet["E2"].Value = "1234.40";
            
            //Add style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Set number format
            style.NumberFormatLocal = "$###.##";
            
            //Get extended format
            IExtendedFormat format = worksheet["E2"].CellStyle;
            
            //Set number format
            format.NumberFormatLocal = "$###.##";
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also