Method FindText
FindText(string, XlsxFindOptions?)
Finds every occurrence of a text in the sheet's cells.
public IReadOnlyList<XlsxCellMatch> FindText(string text, XlsxFindOptions? options = null)
Parameters
textstringThe text to find.
optionsXlsxFindOptionsHow 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
textis null.- ArgumentException
textis empty.- InvalidDocumentException
The sheet's part is malformed.