let sheet = spread.getActiveSheet();
searchCondition.startSheetIndex = spread.getActiveSheetIndex();
searchCondition.endSheetIndex = spread.getActiveSheetIndex();
if (searchCondition.searchOrder == GC.Spread.Sheets.Search.SearchOrder.zOrder) {
searchCondition.findBeginRow = sheet.getActiveRowIndex();
searchCondition.findBeginColumn = sheet.getActiveColumnIndex() - 1;
} else if (searchCondition.searchOrder == GC.Spread.Sheets.Search.SearchOrder.nOrder) {
searchCondition.findBeginRow = sheet.getActiveRowIndex() - 1;
searchCondition.findBeginColumn = sheet.getActiveColumnIndex();
}
if ((searchCondition.searchFlags & GC.Spread.Sheets.Search.SearchFlags.blockRange) > 0) {
let sel = sheet.getSelections()[0];
searchCondition.rowStart = sel.getActiveRowIndex;
searchCondition.columnStart = sel.getActiveColumnIndex;
searchCondition.rowEnd = sel.row + sel.rowCount - 1;
searchCondition.columnEnd = sel.col + sel.colCount -1;
}
我改成这样,但是只有当横向的上一个单元格有查找到的值的时候,单元格的选中才会改成上一个,否则没有反应 |