API Reference
@univerjs
@univerjs/sheets
functions
Getsheetcommandtarget

@univerjs/sheets v0.4.2Docs


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

packages/sheets/src/commands/commands/utils/target-util.ts:53 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.