API Reference
@univerjs
@univerjs/facade
classes
Fworksheet

@univerjs/facade v0.4.2Docs


Class: FWorksheet

Constructors

new FWorksheet()

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

Parameters

ParameterType
_fWorkbookFWorkbook
_workbookWorkbook
_worksheetWorksheet
_injectorInjector
_selectionManagerServiceSheetsSelectionsService
_commandServiceICommandService

Returns

FWorksheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:40 (opens in a new tab)

Properties

PropertyTypeDescriptionDefined in
setActiveSelection(range: FRange) => voidSets the active selection region for this sheet. Param The range to set as the active selection.submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1101 (opens in a new tab)

Methods

addFloatDomToPosition()

addFloatDomToPosition(layer, id?): Nullable<{
  dispose: () => void;
  id: string;
}>

add a float dom to position

Parameters

ParameterTypeDescription
layerIFICanvasFloatDomfloat dom config
id?stringfloat dom id, if not given will be auto generated

Returns

Nullable<{ dispose: () => void; id: string; }>

float dom id and dispose function

NameTypeDefined in
dispose() => voidsubmodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:341 (opens in a new tab)
idstringsubmodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:340 (opens in a new tab)

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:339 (opens in a new tab)


cancelFreeze()

cancelFreeze(): boolean

Cancels the frozen state of the current sheet.

Returns

boolean

True if the command was successful, false otherwise.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1120 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:836 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:846 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:468 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:478 (opens in a new tab)


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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1079 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1065 (opens in a new tab)


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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:118 (opens in a new tab)


getComments()

getComments(): FThreadComment[]

Get all comments in the current sheet

Returns

FThreadComment[]

all comments in the current sheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:326 (opens in a new tab)


getDataValidations()

getDataValidations(): FDataValidation[]

get all data validation rules in current sheet

Returns

FDataValidation[]

all data validation rules

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:286 (opens in a new tab)


getDefaultStyle()

getDefaultStyle(): string | Nullable<IStyleData>

Get the default style of the worksheet

Returns

string | Nullable<IStyleData>

Default style

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:98 (opens in a new tab)


getFilter()

getFilter(): null | FFilter

Returns

null | FFilter

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:305 (opens in a new tab)


getFreeze()

getFreeze(): IFreeze

Get the freeze state of the current sheet.

Returns

IFreeze

The freeze state of the current sheet.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1131 (opens in a new tab)


getFrozenColumns()

getFrozenColumns(): number

Get the number of frozen columns.

Returns

number

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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1168 (opens in a new tab)


getFrozenRows()

getFrozenRows(): number

Get the number of frozen rows.

Returns

number

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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1181 (opens in a new tab)


getInject()

getInject(): Injector

Returns the injector

Returns

Injector

The injector

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:55 (opens in a new tab)


getMaxColumns()

getMaxColumns(): number

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

Returns

number

The maximum columns count of the sheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:270 (opens in a new tab)


getMaxRows()

getMaxRows(): number

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

Returns

number

The maximum rows count of the sheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:278 (opens in a new tab)


getMergedRanges()

getMergedRanges(): FRange[]

Get all merged cells in the current sheet

Returns

FRange[]

all merged cells

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1054 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:194 (opens in a new tab)

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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:203 (opens in a new tab)

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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:213 (opens in a new tab)

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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:220 (opens in a new tab)


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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:108 (opens in a new tab)


getSelection()

getSelection(): null | FSelection

Returns

null | FSelection

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:83 (opens in a new tab)


getSheetId()

getSheetId(): string

Returns the worksheet id

Returns

string

The id of the worksheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:71 (opens in a new tab)


getSheetName()

getSheetName(): string

Returns the worksheet name

Returns

string

The name of the worksheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:79 (opens in a new tab)


getValidatorStatus()

getValidatorStatus(): Promise<ObjectMatrix<Nullable<IDataValidationResCache>>>

get data validation validator status for current sheet

Returns

Promise<ObjectMatrix<Nullable<IDataValidationResCache>>>

matrix of validator status

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:295 (opens in a new tab)


getWorkbook()

getWorkbook(): Workbook

Returns the workbook

Returns

Workbook

The workbook

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:63 (opens in a new tab)


hasHiddenGridLines()

hasHiddenGridLines(): boolean

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

Returns

boolean

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1192 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:895 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:915 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:527 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:547 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:738 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:747 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:757 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:767 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:802 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:370 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:379 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:389 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:399 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:434 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:867 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:499 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1234 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1213 (opens in a new tab)


setActiveRange()

setActiveRange(range): void

Sets the active selection region for this sheet.

Parameters

ParameterTypeDescription
rangeFRangeThe range to set as the active selection.

Returns

void

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1087 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1024 (opens in a new tab)


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>

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:146 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:986 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:997 (opens in a new tab)


setDefaultStyle()

setDefaultStyle(style): Promise<FWorksheet>

Set the default style of the worksheet

Parameters

ParameterTypeDescription
styleNullable<IStyleData>default style

Returns

Promise<FWorksheet>

this worksheet

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:127 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1108 (opens in a new tab)


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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1140 (opens in a new tab)


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

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1154 (opens in a new tab)


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>

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:1200 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:707 (opens in a new tab)


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>

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:169 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:617 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:628 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:680 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:960 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:591 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:940 (opens in a new tab)


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.

Defined in

submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:571 (opens in a new tab)


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