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