xlsxFindReplace | R Documentation |
This function reads an Excel file and replaces specified text (oldname
) with a new text (newname
) across all sheets.
You can specify whether to replace only whole words and whether to perform case-sensitive or case-insensitive replacements.
xlsxFindReplace(
xlsxName,
pattern,
replacement,
word = FALSE,
ignore.case = TRUE,
listonly = FALSE
)
xlsxName |
The name (including path) of the Excel (.xlsx) file to modify. |
pattern |
The text to search for in the Excel file. |
replacement |
The text that will replace |
word |
Logical, if TRUE only whole words will be replaced. |
ignore.case |
Logical, if TRUE the function ignores case. |
listonly |
Logical. If TRUE, the function only lists the files that would be modified without actually modifying them. Defaults to FALSE. |
Returns list: name of file assessed = number of changes; the function modifies the Excel file in-place and prints a message indicating the modified file.
## Not run:
xlsxFindReplace("example.xlsx", "oldText", "newText")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.