Each cell in a Gnumeric worksheet can contain only a single data element. These elements will have one of five basic types: text, numbers, booleans, formulas, or errors. During data entry, Gnumeric assigns a default data type to the cell based on an analysis of the cell contents. This assignment can be changed later if Gnumeric makes the wrong assignment. For information on how to change the data type of a cell, see Section 5.10 ― Formatting Cells.
The five basic types of data which can be stored in a spreadsheet cell are:
A text element can contain a series of letters, numbers or other contents. For example, the first cell in a worksheet might contain the characters —This worksheet describes the company's income — which Gnumeric would interpret to be text. In order to distinguish text elements from number or formula elements, the text element may start with a single quote. For instance, if a cell contained only the three digits 345, Gnumeric would consider that to be the number three hundred and forty five. If this cell is intended to be a string, Gnumeric will store the cell as '345. The newline character cannot be entered directly but must be entered as Alt+Enter. For more information on entering and formatting text elements, see Section 5.2.1 ― Text Data Elements.
A number element can contain a series of digits (425) but may include specific text and formatting characters to indicate negative numbers (-345), decimal separator (34.0567), thousand separators (12,342), currency ($23), dates (21-10-1998), times (10:23) or scientific notation (2.3e12). Dates may include the names of months or their abbreviation. The currency, decimal separator and thousands separator symbols vary depending on the locale (the language and other location specific behaviour) to which Gnumeric has been set. See Section 13.5 ― Languages and Locales to understand how to change the locale. If you want a number to be displayed as a plain string without any number formatting, you can put a single quote (') before it. For more information on entering and formatting, numeric elements see Section 5.2.2 ― Number Data Elements.
A boolean element can contain one of two values: TRUE and FALSE. These are useful as inputs or outputs from formulas and for boolean algebra. More information on boolean data elements is presented in Section 5.2.3 ― Boolean Data Elements.
A formula is an instruction to Gnumeric which describes a calculation which should be performed automatically. These formulas can contain standard arithmetic elements but can also contain references to other cells. Calculations which depend on other cells are usually recalculated when the values of another cell changes. Formulas always begin with a special character — the equals sign (=). The commercial at symbol (@) can be used instead of the equals sign during data entry but Gnumeric will convert this to an equals sign. Alternatively, an entry which describes a calculation and which starts with either the plus (+) or minus symbol (-) will be converted to a formula starting with an equals sign. For a more complete explanation of formulas, see Section 5.2.4 ― Formula Elements.
A cell reference is the part of a formula which refers to another cell. For example, in the formula to add two cells =(A4+A1), both A4 and A1 are cell references. These references can be quite complex referring to cells in different worksheets or even in different files. See Section 5.2.4.3 ― Cell Referencing for a complete explanation of references.
An error element describes the failure to calculate the result of a formula. These values are rarely entered directly by a user but usually are the display given when a formula cannot be correctly calculated. See Section 5.2.5 ― Error Elements for a complete list of error values and their explanation.
A cell may display a series of hash marks (######). This indicates that the result is too wide to display in the cell given the current font setting and the current column width. When this occurs, the value in the cell can be seen in two ways. If the cell is selected, the value will appear in the data entry area (to the right of the equals button directly above the cell grid). Alternatively, the column containing the cell can be widened until the data contents become visible: select the whole column (by clicking on the column header) and choose Format ▸ Column ▸ Auto fit selection.