Excel.WorksheetFreezePanes class
- Extends
Remarks
[Api set: ExcelApi 1.7]
Properties
| context | The request context associated with the object. This connects the add-in's process to the Office host application's process. |
Methods
| freeze |
Sets the frozen cells in the active worksheet view. The range provided corresponds to cells that will be frozen in the top- and left-most pane. |
| freeze |
Freeze the first column or columns of the worksheet in place. |
| freeze |
Freeze the top row or rows of the worksheet in place. |
| get |
Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. |
| get |
Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. If there is no frozen pane, then this method returns an object with its |
| toJSON() | Overrides the JavaScript |
| unfreeze() | Removes all frozen panes in the worksheet. |
Property Details
context
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Property Value
Method Details
freezeAt(frozenRange)
Sets the frozen cells in the active worksheet view. The range provided corresponds to cells that will be frozen in the top- and left-most pane.
freezeAt(frozenRange: Range | string): void;
Parameters
- frozenRange
-
Excel.Range | string
A range that represents the cells to be frozen, or null to remove all frozen panes.
Returns
void
Remarks
[Api set: ExcelApi 1.7]
freezeColumns(count)
Freeze the first column or columns of the worksheet in place.
freezeColumns(count?: number): void;
Parameters
- count
-
number
Optional number of columns to freeze, or zero to unfreeze all columns
Returns
void
Remarks
[Api set: ExcelApi 1.7]
freezeRows(count)
Freeze the top row or rows of the worksheet in place.
freezeRows(count?: number): void;
Parameters
- count
-
number
Optional number of rows to freeze, or zero to unfreeze all rows
Returns
void
Remarks
[Api set: ExcelApi 1.7]
getLocation()
Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane.
getLocation(): Excel.Range;
Returns
Remarks
[Api set: ExcelApi 1.7]
getLocationOrNullObject()
Gets a range that describes the frozen cells in the active worksheet view. The frozen range corresponds to cells that are frozen in the top- and left-most pane. If there is no frozen pane, then this method returns an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.
getLocationOrNullObject(): Excel.Range;
Returns
Remarks
[Api set: ExcelApi 1.7]
toJSON()
Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original Excel.WorksheetFreezePanes object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.WorksheetFreezePanesData) that contains shallow copies of any loaded child properties from the original object.
toJSON(): {
[key: string]: string;
};
Returns
{ [key: string]: string; }
unfreeze()
Removes all frozen panes in the worksheet.
unfreeze(): void;
Returns
void
Remarks
[Api set: ExcelApi 1.7]