public class FindOptions
extends java.lang.Object
Example
//Instantiate the workbook object
Workbook workbook = new Workbook("book1.xls");
//Get Cells collection
Cells cells = workbook.getWorksheets().get(0).getCells();
//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.setSearchBackward(false);
findOptions.setSeachOrderByRows(true);
findOptions.setLookInType(LookInType.VALUES);
//Find the cell with 0 value
Cell cell = cells.find(0, null, findOptions);
| Constructor and Description |
|---|
FindOptions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCaseSensitive()
Indicates if the searched string is case sensitive.
|
boolean |
getConvertNumericData()
Gets a value that indicates whether converting the searched string value to numeric data.
|
int |
getLookAtType()
Look at type.
|
int |
getLookInType()
Look in type.
|
CellArea |
getRange()
Gets and sets the searched range.
|
boolean |
getRegexKey()
Indicates whether the searched key is regex.
|
boolean |
getSeachOrderByRows()
Deprecated.
Use FindOptions.SearchOrderByRows property instead.
|
boolean |
getSearchBackward()
Whether search backward for cells.
|
boolean |
getSearchNext()
Deprecated.
Use FindOptions.SearchBackward property instead.
|
boolean |
getSearchOrderByRows()
Indicates whether search order by rows or columns.
|
Style |
getStyle()
The format to search for.
|
boolean |
getValueTypeSensitive()
Indicates whether searched cell value type should be same with the searched key.
|
boolean |
isRangeSet()
Indicates whether the searched range is set.
|
void |
setCaseSensitive(boolean value)
Indicates if the searched string is case sensitive.
|
void |
setConvertNumericData(boolean value)
Sets a value that indicates whether converting the searched string value to numeric data.
|
void |
setLookAtType(int value)
Look at type.
|
void |
setLookInType(int value)
Look in type.
|
void |
setRange(CellArea ca)
Sets the searched range.
|
void |
setRegexKey(boolean value)
Indicates whether the searched key is regex.
|
void |
setSeachOrderByRows(boolean value)
Deprecated.
Use FindOptions.SearchOrderByRows property instead.
|
void |
setSearchBackward(boolean value)
Whether search backward for cells.
|
void |
setSearchNext(boolean value)
Deprecated.
Use FindOptions.SearchBackward property instead.
|
void |
setSearchOrderByRows(boolean value)
Indicates whether search order by rows or columns.
|
void |
setStyle(Style value)
The format to search for.
|
void |
setValueTypeSensitive(boolean value)
Indicates whether searched cell value type should be same with the searched key.
|
public boolean getCaseSensitive()
public void setCaseSensitive(boolean value)
public int getLookAtType()
See LookAtType.
Remarks
WhengetRegexKey() is true and user has specified the exact rule for the regex,
for performance consideration this property should be set as LookAtType.ENTIRE_CONTENT.
Otherwise we will refactor the search key to ensure it can be matched according to the specific type.
For example, when the type is LookAtType.CONTAINS(this is the default value for this property),
we will add wildcards at the beginning and end of the search key automatically.
In this case, the regular expressions will become more complex and the performance will also decrease.public void setLookAtType(int value)
See LookAtType.
Remarks
WhengetRegexKey() is true and user has specified the exact rule for the regex,
for performance consideration this property should be set as LookAtType.ENTIRE_CONTENT.
Otherwise we will refactor the search key to ensure it can be matched according to the specific type.
For example, when the type is LookAtType.CONTAINS(this is the default value for this property),
we will add wildcards at the beginning and end of the search key automatically.
In this case, the regular expressions will become more complex and the performance will also decrease.public CellArea getRange()
public void setRange(CellArea ca)
ca - the searched range.public boolean isRangeSet()
public boolean getSearchNext()
Remarks
NOTE: This member is now obsolete. Instead, please use FindOptions.SearchBackward property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced.public void setSearchNext(boolean value)
Remarks
NOTE: This member is now obsolete. Instead, please use FindOptions.SearchBackward property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced.public boolean getSearchBackward()
public void setSearchBackward(boolean value)
public boolean getSeachOrderByRows()
Remarks
NOTE: This member is now obsolete. Instead, please use FindOptions.SearchOrderByRows property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced.public void setSeachOrderByRows(boolean value)
Remarks
NOTE: This member is now obsolete. Instead, please use FindOptions.SearchOrderByRows property. This property will be removed 12 months later since November 2018. Aspose apologizes for any inconvenience you may have experienced.public boolean getSearchOrderByRows()
public void setSearchOrderByRows(boolean value)
public int getLookInType()
See LookInType.
public void setLookInType(int value)
See LookInType.
public boolean getRegexKey()
Remarks
Even though the search key has been specified as regex, it may be refactored according to specifiedLookAtType.
For example, when the type is LookAtType.CONTAINS(this is the default value for this options),
wildcards will be added at the beginning and end of the search key automatically to ensure the match will be
checked as "contains". In this case, the regular expressions will become more complex
and the performance will also decrease.
So, for performance consideration, if user has specified the exact rule for the regex, then there is no need to
use LookAtType as additional constraint and user may set it as LookAtType.ENTIRE_CONTENT
to get better performance.public void setRegexKey(boolean value)
Remarks
Even though the search key has been specified as regex, it may be refactored according to specifiedLookAtType.
For example, when the type is LookAtType.CONTAINS(this is the default value for this options),
wildcards will be added at the beginning and end of the search key automatically to ensure the match will be
checked as "contains". In this case, the regular expressions will become more complex
and the performance will also decrease.
So, for performance consideration, if user has specified the exact rule for the regex, then there is no need to
use LookAtType as additional constraint and user may set it as LookAtType.ENTIRE_CONTENT
to get better performance.public boolean getValueTypeSensitive()
public void setValueTypeSensitive(boolean value)
public Style getStyle()
public void setStyle(Style value)
public boolean getConvertNumericData()
public void setConvertNumericData(boolean value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.