Spread.Sheets Documentation
search Method
The search condition.
Searches the specified content.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: SearchResult
value = instance.search(searchCondition);
function search( 
   searchCondition : SearchCondition
) : SearchResult;

Parameters

searchCondition
The search condition.

Return Value

The search result.
Example
This example uses the search method.
activeSheet.getCell(2,3).value("testSearch");
var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
searchCondition.searchString = "testSearch";
searchCondition.startSheetIndex = spread.getActiveSheetIndex();
searchCondition.endSheetIndex = spread.getActiveSheetIndex();

searchCondition.searchOrder = GC.Spread.Sheets.Search.SearchOrder.nOrder;
searchCondition.searchTarget = GC.Spread.Sheets.Search.SearchFoundFlags.cellText;
searchCondition.searchFlags = GC.Spread.Sheets.Search.SearchFlags.ignoreCase| GC.Spread.Sheets.Search.SearchFlags.useWildCards;
var searchresult= activeSheet.search(searchCondition);

var str ="[searchFoundFlag:"+ searchresult.searchFoundFlag+",\r\n foundSheetIndex:"+searchresult.foundSheetIndex+",foundRowIndex:" +
searchresult.foundRowIndex+", foundColumnIndex:"+searchresult.foundColumnIndex+", foundString:"+searchresult.foundSheetIndex+"]";
alert(str);
See Also

Reference

Worksheet type
Searching Data

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.