@univerjssheets-uifacadeclassesFworksheetskeletonmixin

@univerjs/sheets-ui v0.5.1Docs


Class: FWorksheetSkeletonMixin

FBase is a base class for all facade classes. It provides a way to extend classes with static and instance methods. The _initialize as a special method that will be called after the constructor. You should never call it directly.

Extends

Implements

Constructors

new FWorksheetSkeletonMixin()

new FWorksheetSkeletonMixin(
   _fWorkbook, 
   _workbook, 
   _worksheet, 
   _injector, 
   _selectionManagerService, 
   _commandService): FWorksheetSkeletonMixin

Parameters

ParameterType
_fWorkbookFWorkbook
_workbookWorkbook
_worksheetWorksheet
_injectorInjector
_selectionManagerServiceSheetsSelectionsService
_commandServiceICommandService

Returns

FWorksheetSkeletonMixin

Inherited from

FWorksheet.constructor

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:28

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
_commandServicereadonlyICommandService-FWorksheet._commandServicesubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:34
_fWorkbookreadonlyFWorkbook-FWorksheet._fWorkbooksubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:29
_injectorreadonlyInjector-FWorksheet._injectorsubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:32
_selectionManagerServicereadonlySheetsSelectionsService-FWorksheet._selectionManagerServicesubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:33
_workbookreadonlyWorkbook-FWorksheet._workbooksubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:30
_worksheetreadonlyWorksheet-FWorksheet._worksheetsubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:31
setActiveSelectionpublic(range: FRange) => voidSets the active selection region for this sheet. Param The range to set as the active selection.FWorksheet.setActiveSelectionsubmodules/univer/packages/sheets/src/facade/f-worksheet.ts:1003

Methods

_initialize()

_initialize(): void

Returns

void

Inherited from

FWorksheet._initialize

Defined in

submodules/univer/packages/core/src/facade/f-base.ts:33


cancelFreeze()

cancelFreeze(): boolean

Cancels the frozen state of the current sheet.

Returns

boolean

True if the command was successful, false otherwise.

Inherited from

FWorksheet.cancelFreeze

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1022


deleteColumn()

deleteColumn(columnPosition): Promise<FWorksheet>

Deletes the column at the given column position.

Parameters

ParameterTypeDescription
columnPositionnumberThe position of the column, starting at 0 for the first column.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.deleteColumn

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:738


deleteColumns()

deleteColumns(columnPosition, howMany): Promise<FWorksheet>

Deletes a number of columns starting at the given column position.

Parameters

ParameterTypeDescription
columnPositionnumberThe position of the first column to delete, starting at 0 for the first column.
howManynumberThe number of columns to delete.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.deleteColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:748


deleteRow()

deleteRow(rowPosition): Promise<FWorksheet>

Deletes the row at the given row position.

Parameters

ParameterTypeDescription
rowPositionnumberThe position of the row, starting at 0 for the first row.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.deleteRow

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:370


deleteRows()

deleteRows(rowPosition, howMany): Promise<FWorksheet>

Deletes a number of rows starting at the given row position.

Parameters

ParameterTypeDescription
rowPositionnumberThe position of the first row to delete, starting at 0 for the first row.
howManynumberThe number of rows to delete.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.deleteRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:380


getActiveRange()

getActiveRange(): null | FRange

Returns the selected range in the active sheet, or null if there is no active range.

Returns

null | FRange

the active range

Inherited from

FWorksheet.getActiveRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:981


getCellMergeData()

getCellMergeData(row, column): undefined | FRange

Get the merged cell data of the specified row and column.

Parameters

ParameterTypeDescription
rownumberThe row index.
columnnumberThe column index.

Returns

undefined | FRange

The merged cell data, or undefined if the cell is not merged.

Inherited from

FWorksheet.getCellMergeData

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:967


getColumnDefaultStyle()

getColumnDefaultStyle(index, keepRaw?): string | Nullable<IStyleData>

Get the default style of the worksheet column

Parameters

ParameterTypeDefault valueDescription
indexnumberundefinedThe column index
keepRaw?booleanfalseIf true, return the raw style data maybe the style name or style data, otherwise return the data from col manager

Returns

string | Nullable<IStyleData>

The default style of the worksheet column name or style data

Inherited from

FWorksheet.getColumnDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:108


getDefaultStyle()

getDefaultStyle(): string | Nullable<IStyleData>

Get the default style of the worksheet

Returns

string | Nullable<IStyleData>

Default style

Inherited from

FWorksheet.getDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:88


getFreeze()

getFreeze(): IFreeze

Get the freeze state of the current sheet.

Returns

IFreeze

The freeze state of the current sheet.

Inherited from

FWorksheet.getFreeze

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1034


getFrozenColumns()

getFrozenColumns(): number

Get the number of frozen columns.

Returns

number

The number of frozen columns. Returns 0 if no columns are frozen.

Inherited from

FWorksheet.getFrozenColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1071


getFrozenRows()

getFrozenRows(): number

Get the number of frozen rows.

Returns

number

The number of frozen rows. Returns 0 if no rows are frozen.

Inherited from

FWorksheet.getFrozenRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1084


getInject()

getInject(): Injector

Returns the injector

Returns

Injector

The injector

Inherited from

FWorksheet.getInject

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:43


getMaxColumns()

getMaxColumns(): number

Returns the current number of columns in the sheet, regardless of content.

Returns

number

The maximum columns count of the sheet

Inherited from

FWorksheet.getMaxColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:255


getMaxRows()

getMaxRows(): number

Returns the current number of rows in the sheet, regardless of content.

Returns

number

The maximum rows count of the sheet

Inherited from

FWorksheet.getMaxRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:263


getMergedRanges()

getMergedRanges(): FRange[]

Get all merged cells in the current sheet

Returns

FRange[]

all merged cells

Inherited from

FWorksheet.getMergedRanges

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:956


getRange()

getRange(row, column)

getRange(row, column): FRange

Returns a Range object representing a single cell at the specified row and column.

Parameters
ParameterTypeDescription
rownumberThe row index of the cell.
columnnumberThe column index of the cell.
Returns

FRange

A Range object representing the specified cell.

Inherited from

FWorksheet.getRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:183

getRange(row, column, numRows)

getRange(
   row, 
   column, 
   numRows): FRange

Returns a Range object representing a range starting at the specified row and column, with the specified number of rows.

Parameters
ParameterTypeDescription
rownumberThe starting row index of the range.
columnnumberThe starting column index of the range.
numRowsnumberThe number of rows in the range.
Returns

FRange

A Range object representing the specified range.

Inherited from

FWorksheet.getRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:191

getRange(row, column, numRows, numColumns)

getRange(
   row, 
   column, 
   numRows, 
   numColumns): FRange

Returns a Range object representing a range starting at the specified row and column, with the specified number of rows and columns.

Parameters
ParameterTypeDescription
rownumberThe starting row index of the range.
columnnumberThe starting column index of the range.
numRowsnumberThe number of rows in the range.
numColumnsnumberThe number of columns in the range.
Returns

FRange

A Range object representing the specified range.

Inherited from

FWorksheet.getRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:200

getRange(a1Notation)

getRange(a1Notation): FRange

Returns a Range object specified by A1 notation.

Parameters
ParameterTypeDescription
a1NotationstringA string representing a range in A1 notation.
Returns

FRange

A Range object representing the specified range.

Inherited from

FWorksheet.getRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:206


getRowDefaultStyle()

getRowDefaultStyle(index, keepRaw?): string | Nullable<IStyleData>

Get the default style of the worksheet row

Parameters

ParameterTypeDefault valueDescription
indexnumberundefinedThe row index
keepRaw?booleanfalseIf true, return the raw style data maybe the style name or style data, otherwise return the data from row manager

Returns

string | Nullable<IStyleData>

The default style of the worksheet row name or style data

Inherited from

FWorksheet.getRowDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:98


getSelection()

getSelection(): null | FSelection

Returns

null | FSelection

Inherited from

FWorksheet.getSelection

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:71


getSheetId()

getSheetId(): string

Returns the worksheet id

Returns

string

The id of the worksheet

Inherited from

FWorksheet.getSheetId

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:59


getSheetName()

getSheetName(): string

Returns the worksheet name

Returns

string

The name of the worksheet

Inherited from

FWorksheet.getSheetName

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:67


getWorkbook()

getWorkbook(): Workbook

Returns the workbook

Returns

Workbook

The workbook

Inherited from

FWorksheet.getWorkbook

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:51


hasHiddenGridLines()

hasHiddenGridLines(): boolean

Returns true if the sheet’s gridlines are hidden; otherwise returns false. Gridlines are visible by default.

Returns

boolean

Inherited from

FWorksheet.hasHiddenGridLines

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1095


hideColumn()

hideColumn(column): Promise<FWorksheet>

Hides the column or columns in the given range.

Parameters

ParameterTypeDescription
columnFRangeThe column range to hide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.hideColumn

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:797


hideColumns()

hideColumns(columnIndex, numColumns): Promise<FWorksheet>

Hides one or more consecutive columns starting at the given index. Use 0-index for this method.

Parameters

ParameterTypeDefault valueDescription
columnIndexnumberundefinedThe starting index of the columns to hide.
numColumnsnumber1The number of columns to hide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.hideColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:817


hideRow()

hideRow(row): Promise<FWorksheet>

Hides the rows in the given range.

Parameters

ParameterTypeDescription
rowFRangeThe row range to hide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.hideRow

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:429


hideRows()

hideRows(rowIndex, numRows): Promise<FWorksheet>

Hides one or more consecutive rows starting at the given index. Use 0-index for this method.

Parameters

ParameterTypeDefault valueDescription
rowIndexnumberundefinedThe starting index of the rows to hide.
numRowsnumber1The number of rows to hide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.hideRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:449


insertColumnAfter()

insertColumnAfter(afterPosition): Promise<FWorksheet>

Inserts a column after the given column position.

Parameters

ParameterTypeDescription
afterPositionnumberThe column after which the new column should be added, starting at 0 for the first column.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertColumnAfter

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:640


insertColumnBefore()

insertColumnBefore(beforePosition): Promise<FWorksheet>

Inserts a column before the given column position.

Parameters

ParameterTypeDescription
beforePositionnumberThe column before which the new column should be added, starting at 0 for the first column.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertColumnBefore

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:649


insertColumns()

insertColumns(columnIndex, numColumns): Promise<FWorksheet>

Inserts one or more consecutive blank columns in a sheet starting at the specified location.

Parameters

ParameterTypeDefault valueDescription
columnIndexnumberundefinedThe index indicating where to insert a column, starting at 0 for the first column.
numColumnsnumber1The number of columns to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:659


insertColumnsAfter()

insertColumnsAfter(afterPosition, howMany): Promise<FWorksheet>

Inserts a given number of columns after the given column position.

Parameters

ParameterTypeDescription
afterPositionnumberThe column after which the new column should be added, starting at 0 for the first column.
howManynumberThe number of columns to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertColumnsAfter

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:669


insertColumnsBefore()

insertColumnsBefore(beforePosition, howMany): Promise<FWorksheet>

Inserts a number of columns before the given column position.

Parameters

ParameterTypeDescription
beforePositionnumberThe column before which the new column should be added, starting at 0 for the first column.
howManynumberThe number of columns to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertColumnsBefore

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:704


insertRowAfter()

insertRowAfter(afterPosition): Promise<FWorksheet>

Inserts a row after the given row position.

Parameters

ParameterTypeDescription
afterPositionnumberThe row after which the new row should be added, starting at 0 for the first row.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertRowAfter

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:272


insertRowBefore()

insertRowBefore(beforePosition): Promise<FWorksheet>

Inserts a row before the given row position.

Parameters

ParameterTypeDescription
beforePositionnumberThe row before which the new row should be added, starting at 0 for the first row.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertRowBefore

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:281


insertRows()

insertRows(rowIndex, numRows): Promise<FWorksheet>

Inserts one or more consecutive blank rows in a sheet starting at the specified location.

Parameters

ParameterTypeDefault valueDescription
rowIndexnumberundefinedThe index indicating where to insert a row, starting at 0 for the first row.
numRowsnumber1The number of rows to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:291


insertRowsAfter()

insertRowsAfter(afterPosition, howMany): Promise<FWorksheet>

Inserts a number of rows after the given row position.

Parameters

ParameterTypeDescription
afterPositionnumberThe row after which the new rows should be added, starting at 0 for the first row.
howManynumberThe number of rows to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertRowsAfter

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:301


insertRowsBefore()

insertRowsBefore(beforePosition, howMany): Promise<FWorksheet>

Inserts a number of rows before the given row position.

Parameters

ParameterTypeDescription
beforePositionnumberThe row before which the new rows should be added, starting at 0 for the first row.
howManynumberThe number of rows to insert.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.insertRowsBefore

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:336


moveColumns()

moveColumns(columnSpec, destinationIndex): Promise<FWorksheet>

Moves the columns selected by the given range to the position indicated by the destinationIndex. The columnSpec itself does not have to exactly represent an entire column or group of columns to move—it selects all columns that the range spans.

Parameters

ParameterTypeDescription
columnSpecFRangeA range spanning the columns that should be moved.
destinationIndexnumberThe index that the columns should be moved to. Note that this index is based on the coordinates before the columns are moved. Existing data is shifted right to make room for the moved columns while the source columns are removed from the grid. Therefore, the data may end up at a different index than originally specified. Use 0-index for this method.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.moveColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:769


moveRows()

moveRows(rowSpec, destinationIndex): Promise<FWorksheet>

Moves the rows selected by the given range to the position indicated by the destinationIndex. The rowSpec itself does not have to exactly represent an entire row or group of rows to move—it selects all rows that the range spans.

Parameters

ParameterTypeDescription
rowSpecFRangeA range spanning the rows that should be moved.
destinationIndexnumberThe index that the rows should be moved to. Note that this index is based on the coordinates before the rows are moved. Existing data is shifted down to make room for the moved rows while the source rows are removed from the grid. Therefore, the data may end up at a different index than originally specified. Use 0-index for this method.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.moveRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:401


onBeforeCellDataChange()

onBeforeCellDataChange(callback): IDisposable

Subscribe to the cell data change event.

Parameters

ParameterTypeDescription
callback(cellValue) => voidThe callback function to be executed before the cell data changes.

Returns

IDisposable

  • A disposable object to unsubscribe from the event.

Inherited from

FWorksheet.onBeforeCellDataChange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1137


onCellDataChange()

onCellDataChange(callback): IDisposable

Subscribe to the cell data change event.

Parameters

ParameterTypeDescription
callback(cellValue) => voidThe callback function to be executed when the cell data changes.

Returns

IDisposable

  • A disposable object to unsubscribe from the event.

Inherited from

FWorksheet.onCellDataChange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1116


refreshCanvas()

refreshCanvas(): void

Refresh the canvas.

Returns

void

Implementation of

IFWorksheetSkeletonMixin.refreshCanvas

Overrides

FWorksheet.refreshCanvas

Defined in

submodules/univer/packages/sheets-ui/src/facade/f-worksheet.ts:30


setActiveRange()

setActiveRange(range): void

Sets the active selection region for this sheet.

Parameters

ParameterTypeDescription
rangeFRangeThe range to set as the active selection.

Returns

void

Inherited from

FWorksheet.setActiveRange

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:989


setColumnCustom()

setColumnCustom(custom): Promise<FWorksheet>

Set custom properties for given columns.

Parameters

ParameterTypeDescription
customIObjectArrayPrimitiveType<CustomData>The custom properties to set.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setColumnCustom

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:928


setColumnDefaultStyle()

setColumnDefaultStyle(index, style): Promise<FWorksheet>

Set the default style of the worksheet row

Parameters

ParameterTypeDescription
indexnumberThe row index
stylestring | Nullable<IStyleData>The style name or style data

Returns

Promise<FWorksheet>

Inherited from

FWorksheet.setColumnDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:134


setColumnWidth()

setColumnWidth(columnPosition, width): Promise<FWorksheet>

Sets the width of the given column in pixels.

Parameters

ParameterTypeDescription
columnPositionnumberThe position of the given column to set.
widthnumberThe width in pixels to set it to.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setColumnWidth

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:888


setColumnWidths()

setColumnWidths(
   startColumn, 
   numColumns, 
width): Promise<FWorksheet>

Sets the width of the given columns in pixels.

Parameters

ParameterTypeDescription
startColumnnumberThe starting column position to change.
numColumnsnumberThe number of columns to change.
widthnumberThe width in pixels to set it to.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setColumnWidths

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:899


setDefaultStyle()

setDefaultStyle(style): Promise<FWorksheet>

Set the default style of the worksheet

Parameters

ParameterTypeDescription
stylestringdefault style

Returns

Promise<FWorksheet>

this worksheet

Inherited from

FWorksheet.setDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:117


setFreeze()

setFreeze(freeze): boolean

Sets the frozen state of the current sheet.

Parameters

ParameterTypeDescription
freezeIFreezeThe freeze object containing the parameters for freezing the sheet.

Returns

boolean

True if the command was successful, false otherwise.

Inherited from

FWorksheet.setFreeze

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1010


setFrozenColumns()

setFrozenColumns(columns): void

Set the number of frozen columns.

Parameters

ParameterTypeDescription
columnsnumberThe number of columns to freeze. To unfreeze all columns, set this value to 0.

Returns

void

Inherited from

FWorksheet.setFrozenColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1043


setFrozenRows()

setFrozenRows(rows): void

Set the number of frozen rows.

Parameters

ParameterTypeDescription
rowsnumberThe number of rows to freeze. To unfreeze all rows, set this value to 0.

Returns

void

Inherited from

FWorksheet.setFrozenRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1057


setHiddenGridlines()

setHiddenGridlines(hidden): Promise<boolean>

Hides or reveals the sheet gridlines.

Parameters

ParameterTypeDescription
hiddenbooleanIf true, hide gridlines in this sheet; otherwise show the gridlines.

Returns

Promise<boolean>

Inherited from

FWorksheet.setHiddenGridlines

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:1103


setRowCustom()

setRowCustom(custom): Promise<FWorksheet>

Set custom properties for given rows.

Parameters

ParameterTypeDescription
customIObjectArrayPrimitiveType<CustomData>The custom properties to set.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setRowCustom

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:611


setRowDefaultStyle()

setRowDefaultStyle(index, style): Promise<FWorksheet>

Set the default style of the worksheet column

Parameters

ParameterTypeDescription
indexnumberThe column index
stylestring | Nullable<IStyleData>The style name or style data

Returns

Promise<FWorksheet>

Inherited from

FWorksheet.setRowDefaultStyle

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:157


setRowHeight()

setRowHeight(rowPosition, height): Promise<FWorksheet>

Sets the row height of the given row in pixels. By default, rows grow to fit cell contents. If you want to force rows to a specified height, use setRowHeightsForced(startRow, numRows, height).

Parameters

ParameterTypeDescription
rowPositionnumberThe row position to change.
heightnumberThe height in pixels to set it to.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setRowHeight

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:519


setRowHeights()

setRowHeights(
   startRow, 
   numRows, 
height): Promise<FWorksheet>

Sets the height of the given rows in pixels. By default, rows grow to fit cell contents. If you want to force rows to a specified height, use setRowHeightsForced(startRow, numRows, height).

Parameters

ParameterTypeDescription
startRownumberThe starting row position to change.
numRowsnumberThe number of rows to change.
heightnumberThe height in pixels to set it to.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setRowHeights

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:530


setRowHeightsForced()

setRowHeightsForced(
   startRow, 
   numRows, 
height): Promise<FWorksheet>

Sets the height of the given rows in pixels. By default, rows grow to fit cell contents. When you use setRowHeightsForced, rows are forced to the specified height even if the cell contents are taller than the row height.

Parameters

ParameterTypeDescription
startRownumberThe starting row position to change.
numRowsnumberThe number of rows to change.
heightnumberThe height in pixels to set it to.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.setRowHeightsForced

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:582


showColumns()

showColumns(columnIndex, numColumns): Promise<FWorksheet>

Unhides one or more consecutive columns starting at the given index. Use 0-index for this method.

Parameters

ParameterTypeDefault valueDescription
columnIndexnumberundefinedThe starting index of the columns to unhide.
numColumnsnumber1The number of columns to unhide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.showColumns

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:862


showRows()

showRows(rowIndex, numRows): Promise<FWorksheet>

Unhides one or more consecutive rows starting at the given index. Use 0-index for this method.

Parameters

ParameterTypeDefault valueDescription
rowIndexnumberundefinedThe starting index of the rows to unhide.
numRowsnumber1The number of rows to unhide.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.showRows

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:493


unhideColumn()

unhideColumn(column): Promise<FWorksheet>

Unhides the column in the given range.

Parameters

ParameterTypeDescription
columnFRangeThe range to unhide, if hidden.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.unhideColumn

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:842


unhideRow()

unhideRow(row): Promise<FWorksheet>

Unhides the row in the given range.

Parameters

ParameterTypeDescription
rowFRangeThe range to unhide, if hidden.

Returns

Promise<FWorksheet>

This sheet, for chaining.

Inherited from

FWorksheet.unhideRow

Defined in

submodules/univer/packages/sheets/src/facade/f-worksheet.ts:473


extend()

static extend(source): void

Parameters

ParameterType
sourceany

Returns

void

Inherited from

FWorksheet.extend

Defined in

submodules/univer/packages/core/src/facade/f-base.ts:35