Example:
# Instantiate the workbook object
workbook = Workbook("Book2.xlsx")
# Get Cells collection
cells = workbook.getWorksheets().get(0).getCells()
# Instantiate FindOptions Object
findOptions = FindOptions()
# Create a Cells Area
ca = 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.setSearchNext(True)
findOptions.setSeachOrderByRows(True)
findOptions.setLookInType(LookInType.VALUES)
# Find the cell with 0 value
cell = cells.find(0, None, findOptions)
| Constructor Summary |
|---|
| Property Getters/Setters Summary | ||
|---|---|---|
method | getCaseSensitive() | |
method | setCaseSensitive(value) | |
| Indicates if the searched string is case sensitive. | ||
method | getConvertNumericData() | |
method | setConvertNumericData(value) | |
| Gets or sets a value that indicates whether converting the searched string value to numeric data. | ||
void | setCaseSensitive(value) | |
Indicates if the searched string is case sensitive.
|
||
method | isRangeSet() | |
Indicates whether the searched range is set.
|
||
method | getLookAtType() | |
method | setLookAtType(value) | |
| Look at type. The value of the property is LookAtType integer constant. | ||
method | getLookInType() | |
method | setLookInType(value) | |
| Look in type. The value of the property is LookInType integer constant. | ||
method | getRegexKey() | |
method | setRegexKey(value) | |
| Indicates whether the searched key is regex. If true then the searched key will be taken as regex. | ||
method | getSeachOrderByRows() | |
method | setSeachOrderByRows(value) | |
| Indicates whether search order by rows or columns. | ||
method | getSearchBackward() | |
method | setSearchBackward(value) | |
| Whether search backward for cells. | ||
method | getSearchNext() | |
method | setSearchNext(value) | |
| Search order. True: search next. False: search previous. | ||
method | getStyle() | |
method | setStyle(value) | |
| The format to search for. | ||
method | getValueTypeSensitive() | |
method | setValueTypeSensitive(value) | |
| Indicates whether searched cell value type should be same with the searched key. | ||
| Method Summary | ||
|---|---|---|
method | getRange() | |
Gets and sets the searched range.
|
||
method | setRange(ca) | |
Sets the searched range.
|
||
setCaseSensitive(value)
boolean getCaseSensitive() / setCaseSensitive(value)
int getLookAtType() / setLookAtType(value)
boolean isRangeSet()
boolean getSearchNext() / setSearchNext(value)
boolean getSearchBackward() / setSearchBackward(value)
boolean getSeachOrderByRows() / setSeachOrderByRows(value)
int getLookInType() / setLookInType(value)
boolean getRegexKey() / setRegexKey(value)
boolean getValueTypeSensitive() / setValueTypeSensitive(value)
boolean getConvertNumericData() / setConvertNumericData(value)
CellArea getRange()
setRange(ca)
ca: CellArea - the searched range.