SpreadJS Documentation
search Method
The search conditions.
Searches the text in the cells in the specified sheet for the specified string with the specified criteria.
Syntax
var instance = new GcSpread.Sheets.Spread(host, options);
var value; // Type: SearchResult
value = instance.search(searchCondition);
function search( 
   searchCondition : SearchCondition
) : SearchResult;

Parameters

searchCondition
The search conditions.

Return Value

The search result.
Example
This example searches the active sheet using the specified search condition.
var searchCondition = new GcSpread.Sheets.SearchCondition();
searchCondition.searchString = "testSearch";
searchCondition.startSheetIndex = spread.getActiveSheetIndex();
searchCondition.endSheetIndex = spread.getActiveSheetIndex();
searchCondition.searchOrder = GcSpread.Sheets.SearchOrder.NOrder;
searchCondition.searchTarget = GcSpread.Sheets.SearchFoundFlags.CellText;
searchCondition.searchFlags = GcSpread.Sheets.SearchFlags.Ignorecase| GcSpread.Sheets.SearchFlags.UseWildCards;
var searchresult= spread.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

Spread type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.