@univerjs/sheets v0.4.2 • Docs
Function: getSheetCommandTarget()
function getSheetCommandTarget(univerInstanceService, params): Nullable<IResult>
Get targeted Workbook & Worksheet of a command. If unitId
and subUnitId
are given, the function would
try to get these instances. If not, it would try to get the current active instances.
Parameters
Parameter | Type | Description |
---|---|---|
univerInstanceService | IUniverInstanceService | - |
params | object | unitId and subUnitId |
params.subUnitId ? | string | The subUnitId of the Worksheet |
params.unitId ? | string | The unitId of the Workbook |
Returns
Nullable
<IResult
>
Targeted Workbook & Worksheet
Defined in
packages/sheets/src/commands/commands/utils/target-util.ts:53 (opens in a new tab)