[]
Represents a worksheet.
public interface IWorksheet
Public Interface IWorksheet
| Name | Description |
|---|---|
| ActiveCell | Gets the active cell. |
| ActivePane | Returns the IPane object that represents the active pane of the worksheet. |
| AutoFilter | Returns an IAutoFilter object if filtering is on. Returns nothing if filtering is off (read-only). |
| AutoFilterMode | Gets or sets whether the AutoFilter drop-down arrows are currently displayed on the sheet. This property is independent of the AutoFilterMode property (read or write). |
| AutoGenerateColumns | Gets or sets whether to generate columns automatically while binding data. |
| AutoMergeRangesInfo | Gets a list of IAutoMergeRangeInfo objects that represent all auto merge range information of the current worksheet. |
| BackgroundPicture | Gets or sets the background graphic for a worksheet. |
| BackgroundPictures | Returns a IBackgroundPictures object that represents all the backgound pictures on the worksheet or chart sheet (read-only). |
| CellType | Gets or sets the cell type for current sheet. |
| Cells | Returns the IRange object that represents all the cells on the worksheet (not just the cells that are currently in use). This object is read-only. |
| ColumnCount | Gets or sets the column count of the worksheet. |
| Columns | Returns the IRange object that represents all the columns on the specified worksheet (read-only). |
| Comments | Returns the IComments collection that represents all the comments for the specified worksheet (read-only). |
| CommentsThreaded | Returns the ICommentsThreaded collection that represents all the threaded comments for the specified worksheet (read-only). |
| Controls | Gets the control collection of this worksheet. |
| DataSource | Gets or sets the data source of data binding for current sheet. |
| FilterMode | Gets whether the worksheet is in filter mode (read-only). |
| FixedPageBreaks | Gets or sets whether the horizontal and vertical page breaks are fixed when inserting/deleting rows/columns. |
| FreezeColumn | Gets the frozen column. |
| FreezeRow | Gets the frozen row. |
| FreezeTrailingColumn | Gets the number of trailing frozen columns of the sheet. |
| FreezeTrailingRow | Gets the number of trailing frozen rows of the sheet. |
| FrozenLineColor | Gets or sets the color of frozen line. |
| HPageBreaks | Get the collection of horizontal page breaks within the print area. |
| Hyperlinks | Provides access to the collection of Hyperlinks contained in the worksheet. |
| Index | Gets or sets the index number of the object within the collection of similar objects. |
| Name | Gets or sets the name of the object (read or write). |
| Names | Returns the INames collection that represents all the worksheet-specific names (names defined with the "WorksheetName!" prefix). This is a read-only Names object. |
| Outline | Returns an IOutline object that represents the outline for the specified worksheet (read-only). |
| OutlineColumn | Gets the outline column for the worksheet. |
| PageSetup | Returns a PageSetup object that contains all the page setup settings for the specified object. |
| Panes | Worksheet panes. |
| PivotTables | Returns an object that represents either a single PivotTable report (a IPivotTables object) or a collection of all the PivotTable reports (IPivotTables object) on a worksheet (read-only). |
| Protection | Gets or sets the protection status of the worksheet. |
| ProtectionSettings | Returns the IProtectionSettings object that represents the protection options of the worksheet. |
| Range | Returns an instance of IRange which provides access to cell values, formulas, formatting and other cell properties and methods. |
| RowCount | Gets or sets the row count of the worksheet. |
| Rows | Returns the IRange object that represents all the rows on the specified worksheet. This is read-only Range object. |
| Scenarios | Get the IScenarios object that represents the collection of What-If analysis scenarios in the worksheet. |
| Selection | Gets the selection range. |
| Shapes | Returns a IShapes object that represents all the shapes on the worksheet or chart sheet (read-only). |
| SheetView | Returns an object that represents the view settings of this worksheet(read-only). |
| ShowColumnOutline | Gets or sets whether to display the column outline. The default value is true, and this property only applies when interacting with SJS. |
| ShowRowOutline | Gets or sets whether to display the row outline. The default value is true, and this property only applies when interacting with SJS. |
| Sort | Returns the sorted values in the current worksheet (read-only). |
| SplitColumn | Gets the split column. |
| SplitRow | Gets the split row. |
| StandardHeight | Gets or sets the standard (default) height(in points) of all the rows in the worksheet (read-only). |
| StandardHeightInPixel | Gets or sets the standard (default) height(in pixels) of all the rows in the worksheet (read-only). |
| StandardWidth | Gets or sets the standard (default) width(in points) of all the columns in the worksheet (read or write). |
| StandardWidthInPixel | Gets or sets the standard (default) width(in pixels) of all the columns in the worksheet (read or write). |
| TabColor | Gets or sets the primary color of the tab. |
| Tables | Returns a collection of ITable objects in the worksheet. This is a read-only ListObjects collection. |
| Tag | Gets or sets the tag for current sheet. |
| Type | Gets the sheet's type. |
| UsedRange | Returns the IRange object that represents the used range on the specified worksheet, its behavior is equivalent to GetUsedRange(UsedRangeType.Axis | UsedRangeType.Data | UsedRangeType.Comment | UsedRangeType.Style | UsedRangeType.Merge) |
| VPageBreaks | Get the collection of vertical page breaks within the print area. |
| Visible | Determines whether the object is visible (read or write Visibility). |
| Workbook | Returns the workbook. |
| Name | Description |
|---|---|
| Activate() | Makes the current sheet the active sheet. This is equivalent to clicking the sheet's tab. |
| AutoMerge(IRange, AutoMergeDirection, AutoMergeMode, AutoMergeSelectionMode) | Applies auto merge for a range. |
| Copy(IWorkbook) | Copies the sheet to the end of the specified workbook. |
| CopyAfter(IWorksheet) | Copies the sheet to the location after the specified sheet. |
| CopyBefore(IWorksheet) | Copies the sheet to the location before the specified sheet. |
| Delete() | Deletes the object. |
| Evaluate(string) | Evaluates the specified Excel formula or named expression and returns the result. The calculation behavior is consistent with Excel 2019 and earlier versions. |
| Evaluate(string, IFormulaResolver) | |
| Evaluate2(string) | Evaluates the specified Excel formula or named expression and returns the result. The calculation behavior is consistent with Excel 2021/365. |
| FreezePanes(int, int) | Freezes panes at the specified position. |
| FreezeTrailingPanes(int, int) | Freezes trailing panes at the specified position. |
| FromJson(Stream, DeserializationOptions) | Generates a worksheet from the JSON stream. |
| FromJson(string, DeserializationOptions) | Generates a worksheet from the JSON string. |
| GetUsedRange(UsedRangeType) | Gets the used range. |
| Move(IWorkbook) | Moves the sheet to the end of the specified workbook. |
| MoveAfter(IWorksheet) | Moves the sheet to the location after the specified sheet. |
| MoveBefore(IWorksheet) | Moves the sheet to the location before the specified sheet. |
| PrintOut(PrintOutOptions) | Prints the worksheet. |
| Protect(string) | Protects a worksheet so that it cannot be modified. |
| Save(Stream, SaveFileFormat) | Saves current worksheet to the specified format file stream. |
| Save(Stream, SaveOptionsBase) | Saves current worksheet to the specified file stream. |
| Save(string) | Saves current worksheet to file. |
| Save(string, SaveFileFormat) | Saves current worksheet to the specified format file. |
| Save(string, SaveOptionsBase) | Saves current worksheet to the specified file. |
| Select(bool) | Selects the object. |
| ShowAllData() | Makes all rows of the currently filtered list visible. If AutoFilter is in use, this method changes the arrows to "All." |
| SplitPanes(int, int) | Splits panes at the specified position. |
| ToImage(Stream, ImageType) | Saves the worksheet to the specified image stream. |
| ToImage(Stream, ImageType, ImageSaveOptions) | Saves the worksheet to the specified image stream using options. |
| ToImage(string) | Saves the worksheet to the specified image file. |
| ToImage(string, ImageSaveOptions) | Saves the worksheet to the specified image file using options. |
| ToJson(SerializationOptions) | Generates a JSON string from the worksheet. |
| ToJson(Stream, SerializationOptions) | Generates a JSON stream from a worksheet. |
| UnfreezePanes() | Unfreezes panes. |
| UnfreezeTrailingPanes() | Unfreezes trailing panes. |
| Unprotect(string) | Removes protection from the worksheet. |
| UnsplitPanes() | Unsplits panes. |
| Name | Description |
|---|---|
| Activated | Occurs when the worksheet is activated. |
| BeforeDelete | Occurs before the worksheet is deleted. |
| Changed | Occurs when something changes in the cells. |
| Deactivated | Occurs when the worksheet is deactivated. |
| SelectionChange | Occurs when the selection changes on a worksheet. |