Skip to Content
InterfacesISheetsFormulaUIMixin

接口: ISheetsFormulaUIMixin

继承于

方法

showRangeSelectorDialog()

showRangeSelectorDialog(opts): Promise<...[]>

Shows the range selector dialog.

参数

参数类型描述
optsIShowRangeSelectorDialogOptionsThe options of the range selector dialog.

返回

Promise<…[]>

The selected ranges.

示例

const fWorkbook = univerAPI.getActiveWorkbook(); const fWorksheet = fWorkbook.getActiveSheet(); const unitId = fWorkbook.getId(); await univerAPI.showRangeSelectorDialog({ unitId, subUnitId: fWorksheet.getSheetId(), initialValue: [{ unitId, sheetName: fWorksheet.getSheetName(), range: fWorksheet.getRange('A1:B2').getRange() }], maxRangeCount: 2, supportAcrossSheet: true, callback: (ranges, isCancel) => { // Handle the selected ranges console.log(ranges, isCancel); } });