Table of Contents

Method ReplaceText

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

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

text string

The text to find.

replacement string

What to put in its place. Taken literally.

options XlsxFindOptions

How 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

text or replacement is null.

ArgumentException

text is empty.

InvalidDocumentException

A sheet's part is malformed.