문제

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