@univerjs/facade v0.4.2 • Docs
Class: FWorksheet
Constructors
new FWorksheet()
new FWorksheet(
_fWorkbook,
_workbook,
_worksheet,
_injector,
_selectionManagerService,
_commandService): FWorksheet
Parameters
Parameter | Type |
---|---|
_fWorkbook | FWorkbook |
_workbook | Workbook |
_worksheet | Worksheet |
_injector | Injector |
_selectionManagerService | SheetsSelectionsService |
_commandService | ICommandService |
Returns
Defined in
submodules/univer/packages/facade/src/apis/sheets/f-worksheet.ts:40 (opens in a new tab)
Properties
Property | Type | Description | Defined in |
---|---|---|---|
setActiveSelection | (range : FRange ) => void | Sets 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
Parameter | Type | Description |
---|---|---|
layer | IFICanvasFloatDom | float dom config |
id ? | string | float dom id, if not given will be auto generated |
Returns
Nullable
<{
dispose
: () => void
;
id
: string
;
}>
float dom id and dispose function
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
Parameter | Type | Description |
---|---|---|
columnPosition | number | The 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
Parameter | Type | Description |
---|---|---|
columnPosition | number | The position of the first column to delete, starting at 0 for the first column. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
rowPosition | number | The 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
Parameter | Type | Description |
---|---|---|
rowPosition | number | The position of the first row to delete, starting at 0 for the first row. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
row | number | The row index. |
column | number | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
index | number | undefined | The column index |
keepRaw ? | boolean | false | If 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
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
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
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
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
Parameter | Type | Description |
---|---|---|
row | number | The row index of the cell. |
column | number | The column index of the cell. |
Returns
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
Parameter | Type | Description |
---|---|---|
row | number | The starting row index of the range. |
column | number | The starting column index of the range. |
numRows | number | The number of rows in the range. |
Returns
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
Parameter | Type | Description |
---|---|---|
row | number | The starting row index of the range. |
column | number | The starting column index of the range. |
numRows | number | The number of rows in the range. |
numColumns | number | The number of columns in the range. |
Returns
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
Parameter | Type | Description |
---|---|---|
a1Notation | string | A string representing a range in A1 notation. |
Returns
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
Parameter | Type | Default value | Description |
---|---|---|---|
index | number | undefined | The row index |
keepRaw ? | boolean | false | If 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
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
Parameter | Type | Description |
---|---|---|
column | FRange | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
columnIndex | number | undefined | The starting index of the columns to hide. |
numColumns | number | 1 | The 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
Parameter | Type | Description |
---|---|---|
row | FRange | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
rowIndex | number | undefined | The starting index of the rows to hide. |
numRows | number | 1 | The 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
Parameter | Type | Description |
---|---|---|
afterPosition | number | The 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
Parameter | Type | Description |
---|---|---|
beforePosition | number | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
columnIndex | number | undefined | The index indicating where to insert a column, starting at 0 for the first column. |
numColumns | number | 1 | The 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
Parameter | Type | Description |
---|---|---|
afterPosition | number | The column after which the new column should be added, starting at 0 for the first column. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
beforePosition | number | The column before which the new column should be added, starting at 0 for the first column. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
afterPosition | number | The 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
Parameter | Type | Description |
---|---|---|
beforePosition | number | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
rowIndex | number | undefined | The index indicating where to insert a row, starting at 0 for the first row. |
numRows | number | 1 | The 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
Parameter | Type | Description |
---|---|---|
afterPosition | number | The row after which the new rows should be added, starting at 0 for the first row. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
beforePosition | number | The row before which the new rows should be added, starting at 0 for the first row. |
howMany | number | The 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
Parameter | Type | Description |
---|---|---|
columnSpec | FRange | A range spanning the columns that should be moved. |
destinationIndex | number | The 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
Parameter | Type | Description |
---|---|---|
rowSpec | FRange | A range spanning the rows that should be moved. |
destinationIndex | number | The 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
Parameter | Type | Description |
---|---|---|
callback | (cellValue ) => void | The callback function to be executed before the cell data changes. |
Returns
- 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
Parameter | Type | Description |
---|---|---|
callback | (cellValue ) => void | The callback function to be executed when the cell data changes. |
Returns
- 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
Parameter | Type | Description |
---|---|---|
range | FRange | The 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
Parameter | Type | Description |
---|---|---|
custom | IObjectArrayPrimitiveType <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
Parameter | Type | Description |
---|---|---|
index | number | The row index |
style | string | 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
Parameter | Type | Description |
---|---|---|
columnPosition | number | The position of the given column to set. |
width | number | The 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
Parameter | Type | Description |
---|---|---|
startColumn | number | The starting column position to change. |
numColumns | number | The number of columns to change. |
width | number | The 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
Parameter | Type | Description |
---|---|---|
style | Nullable <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
Parameter | Type | Description |
---|---|---|
freeze | IFreeze | The 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
Parameter | Type | Description |
---|---|---|
columns | number | The 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
Parameter | Type | Description |
---|---|---|
rows | number | The 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
Parameter | Type | Description |
---|---|---|
hidden | boolean | If 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
Parameter | Type | Description |
---|---|---|
custom | IObjectArrayPrimitiveType <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
Parameter | Type | Description |
---|---|---|
index | number | The column index |
style | string | 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
Parameter | Type | Description |
---|---|---|
rowPosition | number | The row position to change. |
height | number | The 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
Parameter | Type | Description |
---|---|---|
startRow | number | The starting row position to change. |
numRows | number | The number of rows to change. |
height | number | The 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
Parameter | Type | Description |
---|---|---|
startRow | number | The starting row position to change. |
numRows | number | The number of rows to change. |
height | number | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
columnIndex | number | undefined | The starting index of the columns to unhide. |
numColumns | number | 1 | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
rowIndex | number | undefined | The starting index of the rows to unhide. |
numRows | number | 1 | The 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
Parameter | Type | Description |
---|---|---|
column | FRange | The 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
Parameter | Type | Description |
---|---|---|
row | FRange | The 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)