-
Notifications
You must be signed in to change notification settings - Fork 0
Cell value number format
Pierlam-dev edited this page Jan 24, 2026
·
1 revision
In Excel the displayed value of a cell has a specific management which is not easy to understand.
If defined, the value is displayed based on a number format which is a string and identified by an id.
Number format is part of the style.
Number format are defined in each sheet.
int format= excelCellValue.NumberFormatId;
string format= excelCellValue.NumberFormat;
In OpenXml sdk, it's built like this:
Cell
int? StyleIndex=null or set a value -> link to a CellFormat
Sheet
List of CellFormat
CellFormat
NumberFormatId
FillId
FontId
BorderId
There are 2 kind of number format: built-in and custom.
For built-in ones, there are only Id's, no string number format exists in OpenXml Sdk.
by Pierlam - March 2026