Excel stores numbers as normal numbers only, however you can view them as you want based on how do you format the cells.
If you see there are pre defined number format options available when you choose cell format option, however you can use custom format option if available formats does not server your requirement.
There are four sections of format codes. The sections are separated by semicolons ";" First section defines the formats for positive numbers; Second section defines negative numbers; third section defines how to show zero values; and forth one define how to diplay text. If you specify only two sections, the first is used for positive numbers and zeros, and the second is used for negative numbers. If you specify only one section, all numbers use that format. If you want to skip a section, include the ending semicolon for that section.
# displays only significant digits and does not display insignificant zeros.
0 (zero) displays insignificant zeros if a number has fewer digits than there are zeros in the format.
? adds spaces for insignificant zeros on either side of the decimal point so that decimal points align.
? can also be used for fractions that have varying numbers of digits.