Entering numbers as text
If a number is entered in the format 01481, Calc will drop the leading 0. (Exception: see Tip below.) To preserve the leading zero, for example for telephone area codes, type an apostrophe before the number, like this: '01481.
The data is now regarded as text by Calc. Formulas and functions will treat the entry like any other text entry, which typically results in it being a zero in a formula, and being ignored in a function.
|| Numbers can have leading zeros and be regarded as numbers (as opposed to text) if the cell is formated appropriately. Right-click on the cell and chose Format Cells > Numbers. Adjust the leading zeros setting to add leading zeros to numbers.
|| When using an apostrophe to allow a leading 0 to be displayed, the apostrophe is not visible in the cell after the Enter key is pressed—if the apostrophe is a plain apostrophe (not a “smart quote” apostrophe). If “smart quotes” are selected for apostrophes, the apostrophe remains visible in the cell.
To choose the type of apostrophe, use Tools > AutoCorrect > Custom Quotes. The selection of the apostrophe type affects both Calc and Writer.