View source: R/class-workbook-wrappers.R
| wb_add_ignore_error | R Documentation |
The wb_add_ignore_error() function allows you to suppress specific types of
background error checking warnings for a given cell range. This is useful for
preventing the display of green error indicators (triangles) in cases where
"errors" are intentional, such as numbers being stored as text for
formatting purposes.
wb_add_ignore_error(
wb,
sheet = current_sheet(),
dims = "A1",
calculated_column = FALSE,
empty_cell_reference = FALSE,
eval_error = FALSE,
formula = FALSE,
formula_range = FALSE,
list_data_validation = FALSE,
number_stored_as_text = FALSE,
two_digit_text_year = FALSE,
unlocked_formula = FALSE,
...
)
wb |
A wbWorkbook object. |
sheet |
The name or index of the worksheet. Defaults to the current sheet. |
dims |
A character string defining the cell range (e.g., "A1:A100"). |
calculated_column |
Logical; if |
empty_cell_reference |
Logical; if |
eval_error |
Logical; if |
formula |
Logical; if |
formula_range |
Logical; if |
list_data_validation |
Logical; if |
number_stored_as_text |
Logical; if |
two_digit_text_year |
Logical; if |
unlocked_formula |
Logical; if |
... |
Additional arguments. |
Spreadsheet software performs background validation on formulas and data
entries. When a cell triggers a rule, a visual indicator appears. This
function modifies the <ignoredErrors> section of the worksheet XML to
whitelist specific ranges against specific rules.
Most commonly, this is used with number_stored_as_text = TRUE when
IDs or codes (like "00123") must be preserved as character strings but
contain only numeric digits.
The wbWorkbook object, invisibly.
This function does not fix the underlying data; it only instructs the spreadsheet application not to flag the specific error type visually.
If multiple error types need to be ignored for the same range, you can
set multiple arguments to TRUE in a single call.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.