FindOptions Class
Represents find options.
Inheritance Hierarchy
SystemObject
  Aspose.CellsFindOptions

Namespace: Aspose.Cells
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.10.0.0 (19.10)
Syntax
public class FindOptions

The FindOptions type exposes the following members.

Constructors
  NameDescription
Public methodFindOptions
Initializes a new instance of the FindOptions class
Properties
  NameDescription
Public propertyCaseSensitive
Indicates if the searched string is case sensitive.
Public propertyConvertNumericData
Gets or sets a value that indicates whether converting the searched string value to numeric data.
Public propertyIsCaseSensitive Obsolete.
Indicates if the searched string is case sensitive.
Public propertyIsRangeSet
Indicates whether the searched range is set.
Public propertyLookAtType
Look at type.
Public propertyLookInType
Look in type.
Public propertyRegexKey
Indicates whether the searched key is regex. If true then the searched key will be taken as regex.
Public propertySeachOrderByRows
Indicates whether search order by rows or columns.
Public propertySearchBackward
Whether search backward for cells.
Public propertySearchNext Obsolete.
Search order. True: search next. False: search previous.
Public propertyStyle
The format to search for.
Public propertyValueTypeSensitive
Indicates whether searched cell value type should be same with the searched key.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetRange
Gets and sets the searched range.
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetRange
Sets the searched range.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples
[C#]

//Instantiate the workbook object
Workbook workbook = new Workbook("C:\\book1.xls");

//Get Cells collection 
Cells cells = workbook.Worksheets[0].Cells;

//Instantiate FindOptions Object
FindOptions findOptions = new FindOptions();

//Create a Cells Area
CellArea ca = new CellArea();
ca.StartRow = 8;
ca.StartColumn = 2;
ca.EndRow = 17;
ca.EndColumn = 13;

//Set cells area for find options
findOptions.SetRange(ca);

//Set searching properties
findOptions.SearchBackward = false;

findOptions.SeachOrderByRows = true;

findOptions.LookInType = LookInType.Values;

//Find the cell with 0 value
Cell cell = cells.Find(0, null, findOptions);

[VB.NET]

'Instantiate the workbook object
Dim workbook As New Workbook("C:\book1.xls")

'Get Cells collection 
Dim cells As Cells = workbook.Worksheets(0).Cells

'Instantiate FindOptions Object
Dim findOptions As New FindOptions()

'Create a Cells Area
Dim ca As New CellArea()
ca.StartRow = 8
ca.StartColumn = 2
ca.EndRow = 17
ca.EndColumn = 13

'Set cells area for find options
findOptions.SetRange(ca)

'Set searching properties
findOptions.SearchBackward = True

findOptions.SeachOrderByRows = True

findOptions.LookInType = LookInType.Values

'Find the cell with 0 value
Dim cell As Cell = cells.Find(0, Nothing, findOptions)
See Also