Table of Contents

Method FindText

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

FindText(string, XlsxFindOptions?)

Finds every occurrence of a text in the sheet's cells.

public IReadOnlyList<XlsxCellMatch> FindText(string text, XlsxFindOptions? options = null)

Parameters

text string

The text to find.

options XlsxFindOptions

How to match, or null for the defaults (case-sensitive, anywhere in a cell, values).

Returns

IReadOnlyList<XlsxCellMatch>

The matches, in sheet order and then in the order they stand in the cell.

Remarks

Text cells are searched, and a formula cell by the text it results in (or by its formula, with Formulas). Numbers, booleans and errors are not: what Excel searches for a number is the text it displays, which this library does not produce.

Exceptions

ArgumentNullException

text is null.

ArgumentException

text is empty.

InvalidDocumentException

The sheet's part is malformed.