I try to use the number format #.### that should display
7 as 7
7.123678 as 7.124
7.4 as 7.4
, however is not the case...
cells.Add()
.VerticalAlign(SpreadsheetVerticalAlign.Center)
.Format("#.###");
public static void Main()
{
string format = "#.###";
Console.WriteLine("123.456789m as {0} is {1}", format, (123.456789m).ToString(format));
Console.WriteLine(" 123.4m as {0} is {1}", format, (123.4m).ToString(format));
Console.WriteLine(" 123 as {0} is {1}", format, (123m).ToString(format));
}
output:
123.456789m as #.### is 123.457
123.4m as #.### is 123.4
123 as #.### is 123
added here https://superuser.com/questions/1645944/number-format