FindOptions

FindOptions class

Represents find options.

class FindOptions;

Example

const { Workbook, FindOptions, CellArea, LookInType } = require("aspose.cells.node");

//Instantiate the workbook object
var workbook = new Workbook("input/Book1.xls");
//Get Cells collection 
var cells = workbook.worksheets.get(0).cells;
//Instantiate FindOptions Object
var findOptions = new FindOptions();
//Create a Cells Area
var 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.searchOrderByRows = true;
findOptions.lookInType = LookInType.Values;
//Find the cell with 0 value
var cell = cells.find(0, null, findOptions);

Constructors

ConstructorDescription
constructor()Default Constructor.

Properties

PropertyTypeDescription
caseSensitivebooleanIndicates if the searched string is case sensitive.
lookAtTypeLookAtTypeLook at type.
isRangeSetbooleanReadonly. Indicates whether the searched range is set.
searchBackwardbooleanWhether search backward for cells.
searchOrderByRowsbooleanIndicates whether search order by rows or columns.
lookInTypeLookInTypeLook in type.
regexKeybooleanIndicates 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.
valueTypeSensitivebooleanIndicates whether searched cell value type should be same with the searched key.
styleStyleThe format to search for.
convertNumericDatabooleanGets or sets a value that indicates whether converting the searched string value to numeric data.

Methods

MethodDescription
getCaseSensitive()@deprecated. Please use the ‘caseSensitive’ property instead. Indicates if the searched string is case sensitive.
setCaseSensitive(boolean)@deprecated. Please use the ‘caseSensitive’ property instead. Indicates if the searched string is case sensitive.
getLookAtType()@deprecated. Please use the ’lookAtType’ property instead. Look at type.
setLookAtType(LookAtType)@deprecated. Please use the ’lookAtType’ property instead. Look at type.
isRangeSet()@deprecated. Please use the ‘isRangeSet’ property instead. Indicates whether the searched range is set.
getSearchBackward()@deprecated. Please use the ‘searchBackward’ property instead. Whether search backward for cells.
setSearchBackward(boolean)@deprecated. Please use the ‘searchBackward’ property instead. Whether search backward for cells.
getSearchOrderByRows()@deprecated. Please use the ‘searchOrderByRows’ property instead. Indicates whether search order by rows or columns.
setSearchOrderByRows(boolean)@deprecated. Please use the ‘searchOrderByRows’ property instead. Indicates whether search order by rows or columns.
getLookInType()@deprecated. Please use the ’lookInType’ property instead. Look in type.
setLookInType(LookInType)@deprecated. Please use the ’lookInType’ property instead. Look in type.
getRegexKey()@deprecated. Please use the ‘regexKey’ property instead. Indicates 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.
setRegexKey(boolean)@deprecated. Please use the ‘regexKey’ property instead. Indicates 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.
getValueTypeSensitive()@deprecated. Please use the ‘valueTypeSensitive’ property instead. Indicates whether searched cell value type should be same with the searched key.
setValueTypeSensitive(boolean)@deprecated. Please use the ‘valueTypeSensitive’ property instead. Indicates whether searched cell value type should be same with the searched key.
getStyle()@deprecated. Please use the ‘style’ property instead. The format to search for.
setStyle(Style)@deprecated. Please use the ‘style’ property instead. The format to search for.
getConvertNumericData()@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether converting the searched string value to numeric data.
setConvertNumericData(boolean)@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether converting the searched string value to numeric data.
getRange()Gets and sets the searched range.
setRange(CellArea)Sets the searched range.
isNull()Checks whether the implementation object is null.

constructor()

Default Constructor.

constructor();

caseSensitive

Indicates if the searched string is case sensitive.

caseSensitive : boolean;

lookAtType

Look at type.

lookAtType : LookAtType;

Remarks

When RegexKey is true and user has specified the exact rule for the regex, for performance consideration this property should be set as LookAtType.EntireContent. 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.

isRangeSet

Readonly. Indicates whether the searched range is set.

isRangeSet : boolean;

searchBackward

Whether search backward for cells.

searchBackward : boolean;

searchOrderByRows

Indicates whether search order by rows or columns.

searchOrderByRows : boolean;

lookInType

Look in type.

lookInType : LookInType;

regexKey

Indicates 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.

regexKey : boolean;

Remarks

Even though the search key has been specified as regex, it may be refactored according to specified LookAtType. 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.EntireContent to get better performance.

valueTypeSensitive

Indicates whether searched cell value type should be same with the searched key.

valueTypeSensitive : boolean;

style

The format to search for.

style : Style;

convertNumericData

Gets or sets a value that indicates whether converting the searched string value to numeric data.

convertNumericData : boolean;

getCaseSensitive()

@deprecated. Please use the ‘caseSensitive’ property instead. Indicates if the searched string is case sensitive.

getCaseSensitive() : boolean;

setCaseSensitive(boolean)

@deprecated. Please use the ‘caseSensitive’ property instead. Indicates if the searched string is case sensitive.

setCaseSensitive(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getLookAtType()

@deprecated. Please use the ’lookAtType’ property instead. Look at type.

getLookAtType() : LookAtType;

Returns

LookAtType

Remarks

When RegexKey is true and user has specified the exact rule for the regex, for performance consideration this property should be set as LookAtType.EntireContent. 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.

setLookAtType(LookAtType)

@deprecated. Please use the ’lookAtType’ property instead. Look at type.

setLookAtType(value: LookAtType) : void;

Parameters:

ParameterTypeDescription
valueLookAtTypeThe value to set.

Remarks

When RegexKey is true and user has specified the exact rule for the regex, for performance consideration this property should be set as LookAtType.EntireContent. 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.

isRangeSet()

@deprecated. Please use the ‘isRangeSet’ property instead. Indicates whether the searched range is set.

isRangeSet() : boolean;

getSearchBackward()

@deprecated. Please use the ‘searchBackward’ property instead. Whether search backward for cells.

getSearchBackward() : boolean;

setSearchBackward(boolean)

@deprecated. Please use the ‘searchBackward’ property instead. Whether search backward for cells.

setSearchBackward(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getSearchOrderByRows()

@deprecated. Please use the ‘searchOrderByRows’ property instead. Indicates whether search order by rows or columns.

getSearchOrderByRows() : boolean;

setSearchOrderByRows(boolean)

@deprecated. Please use the ‘searchOrderByRows’ property instead. Indicates whether search order by rows or columns.

setSearchOrderByRows(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getLookInType()

@deprecated. Please use the ’lookInType’ property instead. Look in type.

getLookInType() : LookInType;

Returns

LookInType

setLookInType(LookInType)

@deprecated. Please use the ’lookInType’ property instead. Look in type.

setLookInType(value: LookInType) : void;

Parameters:

ParameterTypeDescription
valueLookInTypeThe value to set.

getRegexKey()

@deprecated. Please use the ‘regexKey’ property instead. Indicates 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.

getRegexKey() : boolean;

Remarks

Even though the search key has been specified as regex, it may be refactored according to specified LookAtType. 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.EntireContent to get better performance.

setRegexKey(boolean)

@deprecated. Please use the ‘regexKey’ property instead. Indicates 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.

setRegexKey(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Even though the search key has been specified as regex, it may be refactored according to specified LookAtType. 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.EntireContent to get better performance.

getValueTypeSensitive()

@deprecated. Please use the ‘valueTypeSensitive’ property instead. Indicates whether searched cell value type should be same with the searched key.

getValueTypeSensitive() : boolean;

setValueTypeSensitive(boolean)

@deprecated. Please use the ‘valueTypeSensitive’ property instead. Indicates whether searched cell value type should be same with the searched key.

setValueTypeSensitive(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getStyle()

@deprecated. Please use the ‘style’ property instead. The format to search for.

getStyle() : Style;

Returns

Style

setStyle(Style)

@deprecated. Please use the ‘style’ property instead. The format to search for.

setStyle(value: Style) : void;

Parameters:

ParameterTypeDescription
valueStyleThe value to set.

getConvertNumericData()

@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether converting the searched string value to numeric data.

getConvertNumericData() : boolean;

setConvertNumericData(boolean)

@deprecated. Please use the ‘convertNumericData’ property instead. Gets or sets a value that indicates whether converting the searched string value to numeric data.

setConvertNumericData(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRange()

Gets and sets the searched range.

getRange() : CellArea;

Returns

Returns the searched range.

setRange(CellArea)

Sets the searched range.

setRange(ca: CellArea) : void;

Parameters:

ParameterTypeDescription
caCellAreathe searched range.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;