API Reference
@univerjs
@univerjs/sheets
Readme

@univerjs/sheets v0.4.2Docs


@univerjs/sheets

Enumerations

EnumerationDescription
InterceptCellContentPriority-
OperatorType-
SelectionMoveType-
UnitAction-
UnitObject-

Classes

ClassDescription
BorderStyleManagerServiceThis service is for managing settings border style status.
DefinedNameDataController-
ExclusiveRangeService-
MergeCellController-
NumfmtService-
RangeMergeUtil-
RangeProtectionCache-
RangeProtectionPermissionDeleteProtectionPoint-
RangeProtectionPermissionEditPoint-
RangeProtectionPermissionManageCollaPoint-
RangeProtectionPermissionViewPoint-
RangeProtectionRefRangeService-
RangeProtectionRenderModel-
RangeProtectionRuleModel-
RangeProtectionService-
RefRangeServiceCollect side effects caused by ref range change
RefSelectionsServiceRefSelectionsService treats selectionMoveStart$ selectionMoving$ and selectionMoveEnd$ differently than SheetsSelectionsService. Because ref selections can be in different workbooks.
SheetInterceptorServiceThis class expose methods for sheet features to inject code to sheet underlying logic.
SheetsSelectionsService-
UniverSheetsPluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
WorkbookCommentPermission-
WorkbookCopyPermission-
WorkbookCopySheetPermission-
WorkbookCreateProtectPermission-
WorkbookCreateSheetPermission-
WorkbookDeleteSheetPermission-
WorkbookDuplicatePermission-
WorkbookEditablePermission-
WorkbookExportPermission-
WorkbookHideSheetPermission-
WorkbookHistoryPermission-
WorkbookManageCollaboratorPermission-
WorkbookMoveSheetPermission-
WorkbookPermissionService-
WorkbookPrintPermission-
WorkbookRecoverHistoryPermission-
WorkbookRenameSheetPermission-
WorkbookSelectionsThis class manages selections in a single workbook.
WorkbookSharePermission-
WorkbookViewHistoryPermission-
WorkbookViewPermission-
WorksheetCopyPermission-
WorksheetDeleteColumnPermission-
WorksheetDeleteProtectionPermission-
WorksheetDeleteRowPermission-
WorksheetEditExtraObjectPermission-
WorksheetEditPermission-
WorksheetFilterPermission-
WorksheetInsertColumnPermission-
WorksheetInsertHyperlinkPermission-
WorksheetInsertRowPermission-
WorksheetManageCollaboratorPermission-
WorksheetPermissionService-
WorksheetPivotTablePermission-
WorksheetProtectionPointModel-
WorksheetProtectionRuleModel-
WorksheetSelectProtectedCellsPermission-
WorksheetSelectUnProtectedCellsPermission-
WorksheetSetCellStylePermission-
WorksheetSetCellValuePermission-
WorksheetSetColumnStylePermission-
WorksheetSetRowStylePermission-
WorksheetSortPermission-
WorksheetViewPermission-

Interfaces

InterfaceDescription
IAddRangeProtectionCommandParams-
IAddRangeProtectionMutationParams-
IAddWorksheetMergeMutationParamsParams of AddWorksheetMergeMutation
IAddWorksheetProtectionParams-
IBorderInfo-
ICopySheetCommandParams-
IDeleteRangeMoveLeftCommandParams-
IDeleteRangeMoveUpCommandParams-
IDeleteRangeMutationParamsParams of DeleteRange
IDeleteRangeProtectionCommandParams-
IDeleteRangeProtectionMutationParams-
IDeleteWorksheetProtectionParams-
IDeltaColumnWidthCommandParams-
IDeltaRowHeightCommand-
IExclusiveRangeService-
IInsertColCommandParams-
IInsertColMutationParamsParams of InsertColMutation
IInsertRangeMutationParamsParams of InsertRange
IInsertRowCommandParams-
IInsertRowMutationParamsParams of InsertRowMutation
IInsertSheetCommandParams-
IInsertSheetMutationParamsParams of InsertSheetMutation
IMoveColsCommandParams-
IMoveColumnsMutationParams-
IMoveRangeCommandParams-
IMoveRangeMutationParams-
IMoveRowsCommandParams-
IMoveRowsMutationParams-
INumfmtItemWithCache-
INumfmtService-
IRangeProtectionRule-
IRemoveColMutationParamsParams of InsertColMutation
IRemoveNumfmtMutationParams-
IRemoveRowColCommandInterceptParams-
IRemoveRowColCommandParams-
IRemoveRowsMutationParamsParams of InsertRowMutation
IRemoveSheetCommandParams-
IRemoveSheetMutationParamsParams of RemoveSheetMutation
IRemoveWorksheetMergeMutationParamsParams of RemoveWorksheetMergeMutation
IReorderRangeCommandParamsCopyright 2023-present DreamNum Inc.
IReorderRangeMutationParamsCopyright 2023-present DreamNum Inc.
ISelectionStylehttps://support.microsoft.com/en-us/office/select-cell-contents-in-excel-23f64223-2b6b-453a-8688-248355f10fa9 (opens in a new tab)
ISelectionWidgetConfigWhether to display the controller that modifies the selection, distributed in 8 locations tl top_left_corner tc top_center_corner tr top_right_corner ml middle_left_corner mr middle_right_corner bl bottom_left_corner bc bottom_center_corner br bottom_right_corner
ISelectionWithCoordAndStyleSelection range Info, contains selection range & primary range primary range is the range of the highlighted cell.
ISelectionWithStyle-
ISetBorderBasicCommandParams-
ISetBorderColorCommandParams-
ISetBorderCommandParams-
ISetBorderPositionCommandParams-
ISetBorderStyleCommandParams-
ISetColDataCommandParams-
ISetColDataMutationParams-
ISetColHiddenMutationParams-
ISetColVisibleMutationParams-
ISetColorCommandParams-
ISetFontFamilyCommandParams-
ISetFontSizeCommandParams-
ISetFrozenMutationParams-
ISetHorizontalTextAlignCommandParams-
ISetNumfmtMutationParams-
ISetRangeProtectionCommandParams-
ISetRangeProtectionMutationParams-
ISetRangeValuesCommandParams-
ISetRangeValuesMutationParamsParams of SetRangeValuesMutation
ISetRangeValuesRangeMutationParamsParams of SetRangeValuesMutation
ISetRowDataCommandParams-
ISetRowDataMutationParams-
ISetRowHiddenMutationParams-
ISetRowVisibleMutationParams-
ISetSelectionsOperationParams-
ISetSpecificColsVisibleCommandParams-
ISetSpecificRowsVisibleCommandParams-
ISetStyleCommandParams-
ISetTabColorMutationParams-
ISetTextRotationCommandParams-
ISetTextWrapCommandParams-
ISetVerticalTextAlignCommandParams-
ISetWorkbookNameCommandParams-
ISetWorkbookNameMutationParams-
ISetWorksheetActivateCommandParams-
ISetWorksheetActiveOperationParams-
ISetWorksheetColWidthMutationParams-
ISetWorksheetDefaultStyleMutationParams-
ISetWorksheetHideMutationParams-
ISetWorksheetNameCommandParams-
ISetWorksheetNameMutationParams-
ISetWorksheetOrderMutationParams-
ISetWorksheetPermissionPointsMutationParams-
ISetWorksheetProtectionParams-
ISetWorksheetRowAutoHeightMutationParams-
ISetWorksheetRowHeightMutationParams-
ISetWorksheetRowIsAutoHeightCommandParams-
ISetWorksheetRowIsAutoHeightMutationParams-
ISetWorksheetShowCommandParams-
ISheetCommandSharedParamsCopyright 2023-present DreamNum Inc.
ISheetLocation-
ISheetLocationBase-
ISheetRangeLocation-
ISheetRowLocation-
IStyleTypeValue-
IToggleCellCheckboxCommandParams-
IToggleGridlinesCommandParams-
IToggleGridlinesMutationParams-
IUniverSheetsConfig-
IWorksheetProtectionRule-
InsertRangeMoveDownCommandParams-
InsertRangeMoveRightCommandParams-

Type Aliases

Type aliasDescription
EffectRefRangeParams-
FormatType-
ICellPermission-
IModel-
INumfmtItem-
IObjectModel-
IOperator-
IRangePermissionPoint-
ISetCellsNumfmt-
IWorksheetProtectionRenderCellData-

Variables

VariableDescription
AddRangeProtectionCommand-
AddRangeProtectionMutation-
AddWorksheetMergeAllCommand-
AddWorksheetMergeCommand-
AddWorksheetMergeHorizontalCommand-
AddWorksheetMergeMutation-
AddWorksheetMergeVerticalCommand-
AddWorksheetProtectionMutation-
COMMAND_LISTENER_SKELETON_CHANGEMutations those will trigger the skeleton change.
COMMAND_LISTENER_VALUE_CHANGE-
ClearSelectionAllCommandThe command to clear all in current selected ranges.
ClearSelectionContentCommandThe command to clear content in current selected ranges.
ClearSelectionFormatCommandThe command to clear content in current selected ranges.
CopySheetCommand-
DISABLE_NORMAL_SELECTIONSAn context key to disable normal selections if its value is set to true.
DeleteRangeMoveLeftCommandThe command to delete range.
DeleteRangeMoveUpCommandThe command to delete range.
DeleteRangeProtectionCommand-
DeleteRangeProtectionMutation-
DeleteWorksheetProtectionMutation-
DeltaColumnWidthCommand-
DeltaRowHeightCommand-
EffectRefRangId-
EmptyMutation-
INTERCEPTOR_POINT-
InsertColAfterCommand-
InsertColBeforeCommand-
InsertColCommand-
InsertColMutation-
InsertDefinedNameCommandThe command to insert new defined name
InsertRangeMoveDownCommandThe command to insert range.
InsertRangeMoveRightCommandThe command to insert range.
InsertRowAfterCommand-
InsertRowBeforeCommand-
InsertRowCommandthis command and its interface should not be exported from index.ts
InsertRowMutation-
InsertSheetCommandThe command to insert new worksheet
InsertSheetMutation-
MAX_CELL_PER_SHEET_KEYCopyright 2023-present DreamNum Inc.
MERGE_CELL_INTERCEPTOR_CHECK-
MoveColsCommand-
MoveColsMutation-
MoveRangeCommand-
MoveRangeMutation-
MoveRowsCommandCommand to move the selected rows (must currently selected) to the specified row.
MoveRowsMutation-
RemoveColCommandThis command would remove the selected columns. These selected rows can be non-continuous.
RemoveColMutation-
RemoveDefinedNameCommandThe command to remove new defined name
RemoveNumfmtMutation-
RemoveRowCommandThis command would remove the selected rows. These selected rows can be non-continuous.
RemoveRowMutation-
RemoveSheetCommandThe command to insert new worksheet
RemoveSheetMutation-
RemoveWorksheetMergeCommand-
RemoveWorksheetMergeMutation-
ReorderRangeCommand-
ReorderRangeMutation-
ResetBackgroundColorCommand-
ResetTextColorCommand-
SELECTION_CONTROL_BORDER_BUFFER_COLOR-
SELECTION_CONTROL_BORDER_BUFFER_WIDTH-
ScrollToCellOperation-
SetBackgroundColorCommand-
SetBoldCommandSet bold font style to currently selected ranges. If the cell is already bold then it will cancel the bold style.
SetBorderBasicCommand-
SetBorderColorCommand-
SetBorderCommandSet border info for range, including clear border (type = NONE)
SetBorderPositionCommand-
SetBorderStyleCommand-
SetColDataCommand-
SetColDataMutation-
SetColHiddenCommand-
SetColHiddenMutation-
SetColVisibleMutation-
SetColWidthCommand-
SetDefinedNameCommandThe command to update defined name
SetFontFamilyCommand-
SetFontSizeCommand-
SetFrozenCancelCommand-
SetFrozenCommand-
SetFrozenMutation-
SetHorizontalTextAlignCommand-
SetItalicCommandSet italic font style to currently selected ranges. If the cell is already italic then it will cancel the italic style.
SetNumfmtMutation-
SetOverlineCommandSet overline font style to currently selected ranges. If the cell is already overline then it will cancel the overline style.
SetRangeProtectionCommand-
SetRangeProtectionMutation-
SetRangeValuesCommandThe command to set values for ranges.
SetRangeValuesMutation-
SetRowDataCommand-
SetRowDataMutation-
SetRowHeightCommand-
SetRowHiddenCommand-
SetRowHiddenMutation-
SetRowVisibleMutation-
SetSelectedColsVisibleCommand-
SetSelectedRowsVisibleCommand-
SetSelectionsOperation-
SetSpecificColsVisibleCommand-
SetSpecificRowsVisibleCommand-
SetStrikeThroughCommandSet strike through font style to currently selected ranges. If the cell is already stroke then it will cancel the stroke style.
SetStyleCommandThe command to set cell style. Set style to a bunch of ranges.
SetTabColorCommand-
SetTabColorMutation-
SetTextColorCommand-
SetTextRotationCommand-
SetTextWrapCommand-
SetUnderlineCommandSet underline font style to currently selected ranges. If the cell is already underline then it will cancel the underline style.
SetVerticalTextAlignCommand-
SetWorkbookNameCommandThe command to set the workbook name. It does not support undo redo.
SetWorkbookNameMutation-
SetWorksheetActivateCommand-
SetWorksheetActiveOperation-
SetWorksheetColWidthMutationSet width of column manually
SetWorksheetDefaultStyleCommand-
SetWorksheetDefaultStyleMutation-
SetWorksheetHideCommand-
SetWorksheetHideMutation-
SetWorksheetNameCommandThe command to set the sheet name.
SetWorksheetNameMutation-
SetWorksheetOrderCommand-
SetWorksheetOrderMutation-
SetWorksheetPermissionPointsCommand-
SetWorksheetPermissionPointsMutation-
SetWorksheetProtectionMutation-
SetWorksheetRightToLeftCommand-
SetWorksheetRightToLeftMutation-
SetWorksheetRowAutoHeightMutation-
SetWorksheetRowHeightMutation-
SetWorksheetRowIsAutoHeightCommand-
SetWorksheetRowIsAutoHeightMutation-
SetWorksheetShowCommand-
ToggleCellCheckboxCommand-
ToggleGridlinesCommand-
ToggleGridlinesMutation-
baseProtectionActions-
defaultWorkbookPermissionPoints-
defaultWorksheetPermissionPoint-

Functions

FunctionDescription
AddMergeRedoSelectionsOperationFactory-
AddMergeUndoMutationFactory-
AddMergeUndoSelectionsOperationFactory-
FactoryAddRangeProtectionMutation-
FactoryDeleteRangeProtectionMutation-
FactorySetRangeProtectionMutation-
IExclusiveRangeService-
INumfmtService-
IRefSelectionsService-
InsertColMutationUndoFactory-
InsertRowMutationUndoFactory-
InsertSheetUndoMutationFactory-
MoveColsMutationUndoFactory-
MoveRowsMutationUndoFactoryGet an undo mutation for the move rows mutation.
RemoveMergeUndoMutationFactory-
RemoveSheetUndoMutationFactory-
ReorderRangeUndoMutationFactory-
SetColDataMutationFactory-
SetFrozenMutationFactory-
SetRangeValuesUndoMutationFactory-
SetRowDataMutationFactory-
SetWorksheetColWidthMutationFactory-
SetWorksheetDefaultStyleMutationFactory-
SetWorksheetRowAutoHeightMutationFactory-
addMergeCellsUtil-
alignToMergedCellsBordersAdjust the range to align merged cell's borders.
checkRangesEditablePermission-
convertPrimaryWithCoordToPrimary-
convertSelectionDataToRangeProcess a selection with coordinates and style, and extract the coordinate information, because the render needs coordinates when drawing. Since the selection.manager.service is unrelated to the coordinates, it only accepts data of type ISelectionWithStyle, so a conversion is necessary.
copyRangeStylesCopy the styles of a range of cells to another range. Used for insert row and insert column.
createTopMatrixFromMatrix-
createTopMatrixFromRanges-
expandToContinuousRangeExpand the range to a continuous range, it uses when Ctrl + A , or only one cell selected to add a pivot table adn so on.
factoryRemoveNumfmtUndoMutation-
factorySetNumfmtUndoMutation-
findAllRectangle-
followSelectionOperation-
generateNullCellGenerate cellValue from range and set null
generateNullCellValueGenerate cellValue from range and set v/p/f/si/custom to null
getAddMergeMutationRangeByTypecalculates the selection based on the merged cell type
getAllRangePermissionPoint-
getAllWorkbookPermissionPoint-
getAllWorksheetPermissionPoint-
getAllWorksheetPermissionPointByPointPanel-
getCellAtRowCol-
getDefaultRangePermission-
getInsertRangeMutationsInsertRange is not a mutation but combination of SetRangeValuesMutation and MoveRangeMutation.
getMoveRangeUndoRedoMutations-
getNormalSelectionStyle-
getPrimaryForRangeGet the default primary cell (the most top-left cell) of a range.
getRemoveRangeMutations-
getSelectionsService-
getSheetCommandTargetGet 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.
getSheetCommandTargetWorkbook-
getSheetMutationTarget-
handleBaseInsertRange-
handleBaseMoveRowsCols-
handleBaseRemoveRange-
handleCommonDefaultRangeChangeWithEffectRefCommands-
handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests-
handleDefaultRangeChangeWithEffectRefCommands-
handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests-
handleDeleteRangeMoveLeft-
handleDeleteRangeMoveUp-
handleDeleteRangeMutation-
handleIRemoveCol-
handleIRemoveRow-
handleInsertCol-
handleInsertRangeMoveDown-
handleInsertRangeMoveRight-
handleInsertRangeMutation-
handleInsertRow-
handleMoveCols-
handleMoveRange-
handleMoveRows-
isSingleCellSelectionExamine if a selection only contains a single cell (a merged cell is considered as a single cell in this case).
rangeMerge-
rotateRange-
runRefRangeMutations-
setEndForRange-
transformCellDataToSelectionData-
transformCellsToRange-

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