Spread.Sheets
search メソッド
検索条件。
指定したシート内のセルのテキストから、指定した文字列を指定した基準で検索します。
シンタックス
Javascript (Usage) 
var instance = new GC.Spread.Sheets.Workbook(host);
var value; // Type: SearchResult
value = instance.search(searchCondition);
Javascript (Specification) 
function search( 
   searchCondition : SearchCondition
) : SearchResult;

パラメータ

searchCondition
検索条件。

戻り値の型

検索結果。
使用例
This example searches the active sheet using the specified search condition.
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= spread.search(searchCondition);

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

関連トピック

参照

Workbook タイプ

 

 


© 2016-2017, GrapeCity inc. All rights reserved.