Provides Excel-compatible number format code rendering.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public static class NumberFormatAdjusts the number of decimal places in a format code.
public static string AdjustDecimals(string formatCode, int delta)
| Type | Name | Description |
|---|---|---|
| string | formatCode | |
| int | delta |
| Type | Description |
|---|---|
| string |
Applies a format code to a value and returns the formatted string. Returns null when the format is General/null (caller should fall back to default rendering).
public static string Apply(string formatCode, object value, Documents.Spreadsheet.CellDataType type)
| Type | Name | Description |
|---|---|---|
| string | formatCode | |
| object | value | |
| Documents.Spreadsheet.CellDataType | type |
| Type | Description |
|---|---|
| string |
Applies a format code to a value and returns the formatted string and optional color. The color is determined by color codes in the format string (e.g., [Red], [Green]).
public static ValueTuple<string, string> ApplyWithColor(string formatCode, object value, Documents.Spreadsheet.CellDataType type)
| Type | Name | Description |
|---|---|---|
| string | formatCode | |
| object | value | |
| Documents.Spreadsheet.CellDataType | type |
| Type | Description |
|---|---|
| ValueTuple<string, string> |