@univerjssheetsindexfunctionsGetsheetcommandtarget

@univerjs/sheets v0.5.0-beta.1Docs


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

ParameterTypeDescription
univerInstanceServiceIUniverInstanceService-
paramsobjectunitId and subUnitId
params.subUnitId?stringThe subUnitId of the Worksheet
params.unitId?stringThe unitId of the Workbook

Returns

Nullable<IResult>

Targeted Workbook & Worksheet

Defined in

submodules/univer/packages/sheets/src/commands/commands/utils/target-util.ts:53