The Gnumeric Manual
Prev | Chapter 9. Cell Formatting | Next

# 9.4. Protection and Validation Tabs

These two tabs are used to control user's access to cells and restrict values of data allowed in a cell. Unlike other formatting options, these two tabs have no effect on a cells appearance. These options are mostly used for writing templates and forms to be filled by others.

## 9.4.1. Protection Tab

Figure 9-6. Protection Tab

This tab allows you to see and change cell protection in imported Excel workbooks. Cell protection has no effect in Gnumeric: you can edit cells whether or not they are marked as protected. However, Gnumeric keeps the protection setting of imported Excel workbooks. If you later save your workbook in Excel format, Gnumeric will save the protection information too. For more information about cell protection in Excel, please refer to Excel documentation.

## 9.4.2. Validation Tab

This tab allows you to set restrictions on allowed values of data in the cells. If you (or someone else) attempts to enter a data that does not meet the set criteria, a warning (or an error message, depending on the options set in this tab) will be shown.

Figure 9-7. Validation Tab

This tab consists of two part. The first part, Criteria is used to set the criteria for the cell values. The second part, Error Alert, is used to choose the action when data entered does not meet the criteria.

To set the criteria for cell values, follow these steps:

1. Choose the type of data contained in the cells, using the Allow drop-down list.

2. Choose a condition that must be satisfied by the cells value, using Condition drop-down list. In these conditions, val stands for the cells value (for text, val stands for the length of text string) and min, max, and bound are constants that you need to specify.

3. Enter the values of constants used in condition. For example, if you chose condition min<=val<=max, you need to enter values of constants min and max.

After specifying the criteria, you need to specify how Gnumeric should respond to incorrect cell value. You can choose one of four possible actions from Action drop-down list:

None

  Accept invalid value without any warning. Equivalent to having no validation.

Stop

  Do not accept the invalid value. Show the user an error message which you need to specify (see below).

Warning

  Show the user a warning dialog, giving him a choice whether to accept or reject the invalid value. You need to specify the message to use in the warning dialog (see below).

Information

  Accept invalid values but show the user a warning dialog. You need to specify the the message to use in the warning dialog (see below).

If you choose one of the options Stop, Warning, or Information, you should enter a message that will be shown to the user in the error or warning dialog. Otherwise, gnumeric will choose a message itself, which may not clearly indicate the relevant validation criteria. You should also enter a title, which will be used as the window title for the dialog window. For example, the values shown in Figure 9-7 will produce the dialog shown in Figure 9-8.

Figure 9-8. Warning dialog in response to invalid input

Prev | Home | Next
Alignment, Font, Border, and Background Tabs | Up | Working with files