Hi Carlos,
We
suspect this as a usage issue. You might have used Value or Value2
property instead of Text property. Value or Value2 property
converts the data type as per value in the cell. In your scenario, number “00005555”
is trying to store as text initially and the number format is applied. So, the value is already converted to
number while assigning, and the cell type is changes to Text later. We
recommend to use the Text property in order to get the issue resolved.
We have attached the code snippet for your reference.
Code
Snippet:
sheet["A1"].Text = "000055555";
sheet.Columns[0].CellStyle.NumberFormat
= "@";
|
Regards,
Prakash