Free Support Forum -

Formating Cell

Hi, I need to format the following situation:

I have the number 0,009105313 in a cell, I need that number apers 9,10, other exemple: the number

0,008762119 I need to apears 8,77. What kind of format make it??

Thank you


Well, I don't find any proper custom excel format for the case. One little workaround is, I think you may try to get the cell value and then use String.Substring function to get the three digits and show in the related cell.

E.g., (if B5 has the value "0,009105313" it will show 910)

WebCells cells = GridWeb1.WebWorksheets[0].Cells;
WebCell cell = cells["B5"];
string st = cell.StringValue;

Thank you.