Syncfusion.XlsIO.Base
Example 


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

FindAll(String,ExcelFindType) Method

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

Parameters

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

Return Value

Returns the cells with a specified string value, or null if value was not found.
Example
The following code illustrates how to find the cells with specified string value.
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
IRange[] results = sheet.FindAll("Hello World", ExcelFindType.Text);
            
string fileName = "Find.xlsx";
workbook.SaveAs(fileName);
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also