Skip to Content
InterfacesISheetsFormulaUIMixin

Interface: ISheetsFormulaUIMixin

Extended by

Methods

showRangeSelectorDialog()

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

Shows the range selector dialog.

Parameters

ParameterTypeDescription
optsIShowRangeSelectorDialogOptionsThe options of the range selector dialog.

Returns

Promise<…[]>

The selected ranges.

Example

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); } });