Вопрос

I have the following command for the part numbers in excel file:

range.NumberFormat = "#,#";

But when the cell is zero zeros are not shown.

What's the problem?

Это было полезно?

Решение

You probably want to use #,0 as your number format. From the Excel Documentation, # means a digit, however do not show it if it is insignificant. Look at the section "Guidelines for using decimal places, spaces, colors, and conditions" for more information.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top