Excel Number Format

We can use FormatString property to format the display value of any Excel Cell or Range in C# with IronXL.

Using workSheet["A2"] will only select Range of the specified address. To access Cell, the First() method has to be used. However, FormatString property can be set from both Cell and Range. Therefore, the First() method can be taken out completely. More Excel number formats can be applied using the same method as the code example have shown.

You can download a file project from this link.