Method ReplaceText
ReplaceText(string, string, XlsxFindOptions?)
Replaces every occurrence of a text in the workbook's worksheets. See ReplaceText(string, string, XlsxFindOptions?).
public XlsxReplaceResult ReplaceText(string text, string replacement, XlsxFindOptions? options = null)
Parameters
textstringThe text to find.
replacementstringWhat to put in its place. Taken literally.
optionsXlsxFindOptionsHow to match, or null for the defaults.
Returns
- XlsxReplaceResult
What was replaced, and the cells that held a match and were left alone.
Exceptions
- ArgumentNullException
textorreplacementis null.- ArgumentException
textis empty.- InvalidDocumentException
A sheet's part is malformed.