Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface > FindAll Method : FindAll(String,ExcelFindType,ExcelFindOptions) Method
Value to search.
Type of value to search.
Way to search.

FindAll(String,ExcelFindType,ExcelFindOptions) Method

Returns the cells of the specified string value with the specified ExcelFindType and ExcelFindOptions.
Syntax
'Declaration
 
Overloads Function FindAll( _
   ByVal findValue As String, _
   ByVal flags As ExcelFindType, _
   ByVal findOptions As ExcelFindOptions _
) As IRange()
'Usage
 
Dim instance As IWorksheet
Dim findValue As String
Dim flags As ExcelFindType
Dim findOptions As ExcelFindOptions
Dim value() As IRange
 
value = instance.FindAll(findValue, flags, findOptions)

Parameters

findValue
Value to search.
flags
Type of value to search.
findOptions
Way to search.

Return Value

Returns the cells with a specified string value and specified find options , or null if value was not found.
Example
The following code illustrates how to find the cells with specified string value with specified Excel find option.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
            
//Find all with string and specified find option.
IRange[] results = sheet.FindAll("Hello World", ExcelFindType.Text, ExcelFindOptions.MatchCase);
            
string fileName = "Find.xlsx";
workbook.SaveAs(fileName);
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.3460.0.29

See Also