Class SearchManager
Class which provides support to find or replace the text in the document with advanced search options.
And also provides support to select all cells with formulas, conditional formatting, constants, data validation, etc.
Inheritance
System.Object
SearchManager
Implements
System.IDisposable
Assembly: Syncfusion.SfSpreadsheet.WPF.dll
Syntax
public class SearchManager : Object, IDisposable
Constructors
SearchManager(SfSpreadsheet)
Hold the spreadsheet instance.
Declaration
public SearchManager(SfSpreadsheet spreadsheet)
Parameters
Methods
Dispose()
Dispose maintained instances.
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
FindAll(IWorkbook, String, SearchBy, ExcelFindType, Boolean, Boolean)
Returns all matched ranges within the workbook based on the given options.
Need to specify the workbook to perform find all operation.
Need to specify the search text to perform find all operation.
Searchby option is used to determine the find all operation performed in row wise or column wise.
Find type option is used to determine the find all operation perform whether on formulas or values.
Match case option is used to determine the find all operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the find all operation perform on in which cell content is matched with given find text.
Returns found ranges in array format
Declaration
public IRange[] FindAll(IWorkbook workbook, string searchText, SearchBy searchByOption, ExcelFindType findType, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorkbook |
workbook |
|
System.String |
searchText |
|
SearchBy |
searchByOption |
|
ExcelFindType |
findType |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
FindAll(IWorksheet, String, SearchBy, ExcelFindType, Boolean, Boolean)
Returns all matched ranges within the specified worksheet based on the given options.
Need to specify the worksheet to perform find all operation.
Need to specify the search text to perform find all operation.
Searchby option is used to determine the find all operation performed in row wise or column wise.
Find type option is used to determine the find all operation perform whether on formulas or values.
Match case option is used to determine the find all operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the find all operation perform on in which cell content is matched with given find text.
Returns found ranges in array format
Declaration
public IRange[] FindAll(IWorksheet worksheet, string searchText, SearchBy searchByOption, ExcelFindType findType, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
|
System.String |
searchText |
|
SearchBy |
searchByOption |
|
ExcelFindType |
findType |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
Returns ranges which have conditional formatting within the specified worksheet..
Declaration
public IRange[] FindConditionalFormatting(IWorksheet worksheet)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
Need to specify the worksheet to find the conditional format applied ranges.
|
Returns
Type |
Description |
IRange[] |
Returns array ranges.
|
FindConstants(IWorksheet)
Returns ranges which have constants within the specified worksheet..
Declaration
public IRange[] FindConstants(IWorksheet worksheet)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
Need to specify the worksheet to find the constants.
|
Returns
Type |
Description |
IRange[] |
Returns array ranges
|
FindDataValidation(IWorksheet)
Returns ranges which have data validation within the specified worksheet..
Declaration
public IRange[] FindDataValidation(IWorksheet worksheet)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
Need to specify the worksheet to find the datavalidation applied range.
|
Returns
Type |
Description |
IRange[] |
Returns array ranges
|
Returns ranges which have formulas within the specified worksheet..
Declaration
public IRange[] FindFormulas(IWorksheet worksheet)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
Need to specify the worksheet to find the formulas.
|
Returns
Type |
Description |
IRange[] |
Returns array ranges
|
FindNext(IWorkbook, String, SearchBy, ExcelFindType, Boolean, Boolean)
Returns immediate matched range from the current range within the workbook based on the given options.
Need to specify the workbook to perform find next operation.
Need to specify the search text to perform find next operation.
Searchby option is used to determine the find next operation performed in row wise or column wise.
Find type option is used to determine the find next operation perform whether on formulas or values.
Match case option is used to determine the find next operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the find next operation perform on in which cell content is matched with given find text.
Returns found range.
Declaration
public IRange FindNext(IWorkbook workbook, string searchText, SearchBy searchByOption, ExcelFindType findType, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorkbook |
workbook |
|
System.String |
searchText |
|
SearchBy |
searchByOption |
|
ExcelFindType |
findType |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
FindNext(IWorksheet, String, SearchBy, ExcelFindType, Boolean, Boolean)
Returns immediate matched range from the current range within the specified worksheet based on the given options.
Need to specify the worksheet to perform find next operation.
Need to specify the search text to perform find next operation.
Searchby option is used to determine the find next operation performed in row wise or column wise.
Find type option is used to determine the find next operation perform whether on formulas or values.
Match case option is used to determine the find next operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the find next operation perform on in which cell content is matched with given find text.
Returns found range.
Declaration
public IRange FindNext(IWorksheet worksheet, string searchText, SearchBy searchByOption, ExcelFindType findType, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
|
System.String |
searchText |
|
SearchBy |
searchByOption |
|
ExcelFindType |
findType |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
ReplaceAll(IWorkbook, String, String, Boolean, Boolean)
Returns replaced ranges within the workbook based on the given options.
Need to specify the workbook to perform replace all operation.
Need to specify the search text to perform replace all operation.
Need to specify the replace text to perform replace all operation.
Match case option is used to determine the replace all operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the replace all operation perform on in which cell content is matched with given find text.
Returns all replaced ranges.
Declaration
public IRange[] ReplaceAll(IWorkbook workbook, string searchText, string replaceText, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorkbook |
workbook |
|
System.String |
searchText |
|
System.String |
replaceText |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
ReplaceAll(IWorksheet, String, String, Boolean, Boolean)
Returns replaced ranges within the specified worksheet based on the given options.
Need to specify the worksheet to perform replace all operation.
Need to specify the search text to perform replace all operation.
Need to specify the replace text to perform replace all operation.
Match case option is used to determine the replace all operation perform whether on case sensitive text or not.
Match entire cell contents option is used to determine the replace all operation perform on in which cell content is matched with given find text.
Returns replaced ranges.
Declaration
public IRange[] ReplaceAll(IWorksheet worksheet, string searchText, string replaceText, bool matchCase, bool matchEntireCell)
Parameters
Type |
Name |
Description |
IWorksheet |
worksheet |
|
System.String |
searchText |
|
System.String |
replaceText |
|
System.Boolean |
matchCase |
|
System.Boolean |
matchEntireCell |
|
Returns
Implements
System.IDisposable