FindOptions class

FindOptions class

Represents find options.

The FindOptions type exposes the following members:

Constructors

ConstructorDescription
initConstructs a new instance of FindOptions

Properties

PropertyDescription
is_case_sensitiveIndicates if the searched string is case sensitive.
case_sensitiveIndicates if the searched string is case sensitive.
look_at_typeLook at type.
is_range_setIndicates whether the searched range is set.
search_nextSearch order. True: search next. False: search previous.
search_backwardWhether search backward for cells.
seach_order_by_rowsIndicates whether search order by rows or columns.
look_in_typeLook in type.
regex_keyIndicates whether the searched key is regex.
If true the searched key will be taken as regex and parsed. Otherwise the key will be parsed according to the rules in ms excel.
value_type_sensitiveIndicates whether searched cell value type should be same with the searched key.
styleThe format to search for.
convert_numeric_dataGets or sets a value that indicates whether converting the searched string value to numeric data.

Methods

MethodDescription
get_rangeGets and sets the searched range.
set_rangeSets the searched range.

Example

from aspose.cells import CellArea, FindOptions, LookInType, Workbook

# Instantiate the workbook object
workbook = Workbook("book1.xls")
# Get Cells collection
cells = workbook.worksheets[0].cells
# Instantiate FindOptions Object
findOptions = FindOptions()
# Create a Cells Area
ca = CellArea()
ca.start_row = 8
ca.start_column = 2
ca.end_row = 17
ca.end_column = 13
# Set cells area for find options
findOptions.set_range(ca)
# Set searching properties
findOptions.search_backward = False
findOptions.seach_order_by_rows = True
findOptions.look_in_type = LookInType.VALUES
# Find the cell with 0 value
cell = cells.find(0, None, findOptions)

See Also