format cell thru .net
How to format the Excel cell type into percentage type or custom type through .net?
How to format the Excel cell type into percentage type or custom type through .net?
Hi Mahe,
Set the NumberFormat property of a Range object to the desired format code. For example, the following line changes the active cell so that it displays numbers as percentages (this/Me = Sheet1 in this example):
[C#]
this.Application.ActiveCell.NumberFormat = "0.00%";
[VB]
Me.Application.ActiveCell.NumberFormat = "0.00%"
Regards,
Steve