本帖最后由 344860032 于 2017-10-17 08:44 编辑
动态新增单元格,想让滚动条定位到新增的单元格那,不然看不见新增的单元格。
找了一下资料,好像是setViewportRightColumn这个函数设置吧,但是没有这个函数。
http://gcdn.gcpowertools.com.cn/showtopic-15608-1-1.html(以前别人的提问)
//使用检索,查找到位置,但是滚动条怎么定位?
var searchCondition = new GC.Spread.Sheets.Search.SearchCondition();
searchCondition.searchString = "Q24.1";
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 + "]";
|
|