23
Views
3
Comments
[Advanced Excel] Decimals with 10 or more numbers have the decimal part removed
Question
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Service

When I try to write big numbers , for example : 

The decimal part gets cut and the number is not formatted as decimal :

If I change it to Number in Excel it get formatted as expected :

What do I need to do for the number be formatted correctly?

Please note that this only happens for number with 10 or more digits before the decimal symbol.

1234.12 will work.

2025-07-22 10-30-27
Mandar Deshpande

I suggest you to pass CellType = "text" and also pass CellValue = "1234567890.12". This will preserve the value.

2022-12-22 10-00-39
Beatriz Sabino

Hi Nelson,

When using EPPlus to write a decimal value like 1234567890.12, if Excel isn't displaying the .12 part, it's likely because the cell format hasn't been explicitly set.

To ensure the decimal portion is preserved, you can use the Cell_WriteByIndexWithFormat action and specify the NumberFormat under CellFormat

Setting the format to "0.####################" will ensure the full decimal value is properly displayed in Excel.

2024-10-03 06-54-46
PRAVEEN RAJKUMAR

@Nelson André You can achieve this using Cell_ReadByIndex or Cell_ReadByName gave the ReadText as True. If true always reads the cell value as text.

You can Read it as text "1234567890.12" and convert it to Decimal if required.


Thanks and Regards,

PRAVEEN R

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.