IInternalWorksheet Properties |
The IInternalWorksheet type exposes the following members.
Name | Description | |
---|---|---|
![]() |
ActivePane |
Identifier of pane with active cell cursor.
(Inherited from
IWorksheet
.)
|
![]() |
AllocatedRange |
Returns a Range object that represents a cell or a range of cells.
(Inherited from
IWorksheet
.)
|
![]() |
AutoFilters |
Returns collection of worksheet's autofilters. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
Cells |
Returns all used cells in the worksheet. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
CheckBoxes |
Returns collection with all checkboxes inside this worksheet. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
CodeName |
Name that is used by macros to access the workbook items.
(Inherited from
IWorksheet
.)
|
![]() |
Columns |
For a Worksheet object, returns an array of Range objects that represents
all the columns on the specified worksheet. Read-only Range object.
(Inherited from
IWorksheet
.)
|
![]() |
ComboBoxes |
Returns collection with all comboboxes inside this worksheet. Read-only.
(Inherited from
ITabSheet
.)
|
![]() ![]() |
Comments |
Comments collection.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to access the comments collection in the worksheet:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Adding comments to a cell.</para><para>ICommentShape comment1 = worksheet.Range["A1"].AddComment();</para><para>ICommentShape comment2 = worksheet.Range["B1"].AddComment();</para><para>//Set comment text</para><para>comment1.Text = "Comment1";</para><para>comment2.Text = "Comment2";</para><para>//Check count</para><para>Console.Write(worksheet.Comments.Count);</para><para>//Save to file</para><para>workbook.SaveToFile("Comments.xlsx");</para>
|
![]() ![]() |
DefaultColumnWidth |
Returns or sets the standard (default) width of all the columns in the
worksheet. Read/write Double.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to get the default column width:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Get column width</para><para>Console.Write(worksheet.DefaultColumnWidth);</para><para>//Set default width</para><para>worksheet.DefaultColumnWidth = 40;</para><para>//Save to file</para><para>workbook.SaveToFile("DefaultColumnWidth.xlsx");</para>
|
![]() |
DefaultPrintRowHeight |
Return default row height in pixel.
|
![]() ![]() |
DefaultRowHeight |
Returns the standard (default) height of all the rows in the worksheet,
in points. Read/write Double.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to get the default row height:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Get row height</para><para>Console.Write(worksheet.DefaultRowHeight);</para><para>//Set default height</para><para>worksheet.DefaultRowHeight = 40;</para><para>//Save to file</para><para>workbook.SaveToFile("DefaultRowHeight.xlsx");</para>
|
![]() |
DisplayPageBreaks |
True if page breaks (both automatic and manual) on the specified
worksheet are displayed. Read / write Boolean.
(Inherited from
IWorksheet
.)
|
![]() |
FirstColumn |
Gets or sets one-based index of the first column of the worksheet.
|
![]() |
FirstRow |
Gets or sets one-based index of the first row of the worksheet.
|
![]() |
FirstVisibleColumn |
Index to first visible column in right pane(s).
(Inherited from
IWorksheet
.)
|
![]() |
FirstVisibleRow |
Index to first visible row in bottom pane(s).
(Inherited from
IWorksheet
.)
|
![]() |
FormulasVisible |
Gets or sets a value indicating whether the formulas are visible.
(Inherited from
IWorksheet
.)
|
![]() ![]() |
GridLineColor |
Gets / sets Grid line color.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to set the grid line color:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set grid lines color</para><para>worksheet.GridLineColor = ExcelColors.Red;</para><para>//Save to file</para><para>workbook.SaveToFile("GridLineColor.xlsx");</para>
|
![]() ![]() |
GridLinesVisible |
True if gridlines are visible;
False otherwise.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to set visibility for grid lines:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set grid line visibility</para><para>worksheet.GridLinesVisible = false;</para><para>//Save to file</para><para>workbook.SaveToFile("GridLinesVisible.xlsx");</para>
|
![]() ![]() |
HasOleObjects |
Gets or sets a value indicating whether this instance is OLE object.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject and check Ole Object:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create image stream</para><para>System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");</para><para>//Add ole object</para><para>IOleObject oleObject = worksheet.OleObjects.Add("Shapes.xlsx", image, OleLinkType.Embed);</para><para>//Check HasOleObject.Output will be true.</para> Console.Write(worksheet.HasOleObjects); <para>//Save to file</para><para>workbook.SaveToFile("HasOleObjects.xlsx");</para> |
![]() |
HorizontalSplit |
Gets or sets the position of horizontal split in the worksheet.
(Inherited from
IWorksheet
.)
|
![]() |
HPageBreaks |
Returns an HPageBreaks collection that represents the horizontal
page breaks on the sheet. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
HyperLinks |
Collection of all worksheet's hyperlinks.
(Inherited from
IWorksheet
.)
|
![]() |
Index |
Returns the index number of the object within the collection of
similar objects. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
IsDisplayZeros |
True if zero values to be displayed
False otherwise.
(Inherited from
IWorksheet
.)
|
![]() |
IsPasswordProtected |
Indicates if the worksheet is password protected.
(Inherited from
ITabSheet
.)
|
![]() |
IsRightToLeft |
Indicates whether worksheet is displayed right to left.
(Inherited from
ITabSheet
.)
|
![]() |
IsSelected |
Indicates whether tab of this sheet is selected. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
IsStringsPreserved |
Indicates if all values in the workbook are preserved as strings.
(Inherited from
IWorksheet
.)
|
![]() |
Item String |
Get cell range.
(Inherited from
IWorksheet
.)
|
![]() |
Item Int32, Int32 |
Gets / sets cell by row and index.
(Inherited from
IWorksheet
.)
|
![]() |
Item Int32, Int32, Int32, Int32 |
Get cells range.
(Inherited from
IWorksheet
.)
|
![]() |
LastColumn |
Gets or sets one-based index of the last column of the worksheet.
|
![]() |
LastRow |
Gets or sets one-based index of the last row of the worksheet.
|
![]() ![]() |
LeftVisibleColumn |
Gets/sets left visible column of the worksheet.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to set the left visible column:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set left visible column</para><para>worksheet.LeftVisibleColumn = 3;</para><para>//Get left visible column</para><para>Console.Write(worksheet.LeftVisibleColumn);</para><para>//Save to file</para><para>workbook.SaveToFile("LeftVisibleColumn.xlsx");</para>
|
![]() |
ListObjects |
Gets collection of all list objects in the worksheet.
(Inherited from
IWorksheet
.)
|
![]() ![]() |
MergedCells |
Returns all merged ranges. Read-only.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to get the merged ranges:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Merge cells</para><para>worksheet["C2:D2"].Merge();</para><para>worksheet["F3:G3"].Merge();</para><para>//Get merged ranges</para><para>IXLSRange[] mergedRanges = worksheet.MergedCells;</para><para>//Get merged range count . Output will be 2</para><para>Console.Write(mergedRanges.Length);</para><para>//Save to file</para><para>workbook.SaveToFile("MergedCells.xlsx");</para>
|
![]() |
Name |
Gets / sets name of the tab sheet.
(Inherited from
ITabSheet
.)
|
![]() |
Names |
For a Worksheet object, returns a Names collection that represents
all the worksheet-specific names (names defined with the "WorksheetName!"
prefix). Read-only Names object.
(Inherited from
IWorksheet
.)
|
![]() ![]() |
OleObjects |
Gets the OLE objects.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create image stream</para><para>System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");</para><para>//Add ole object</para><para>IOleObject oleObject = worksheet.OleObjects.Add("Shapes.xlsx", image, OleLinkType.Embed);</para><para>//Save to file</para><para>workbook.SaveToFile("OLEObjects.xlsx");</para>
|
![]() |
PageSetup |
Returns a PageSetup object that contains all the page setup settings
for the specified object. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
Parent |
Gets the parent object of the current instance.
(Inherited from
IExcelApplication
.)
|
![]() |
ParentWorkbook |
Returns parent workbook. Read-only.
|
![]() |
Pictures |
Returns pictures collection. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
PivotTables |
Returns pivot table collection containing all pivot tables in the worksheet. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
ProtectContents |
Indicates is current sheet is protected.
(Inherited from
ITabSheet
.)
|
![]() |
ProtectDrawingObjects |
True if objects are protected. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
Protection |
Gets protected options. Read-only. For sets protection options use "Protect" method.
(Inherited from
ITabSheet
.)
|
![]() |
ProtectScenarios |
True if the scenarios of the current sheet are protected. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
RadioButtons |
Returns collection with all option buttons inside this worksheet. Read-only.
(Inherited from
ITabSheet
.)
|
![]() ![]() |
Range |
Returns a Range object that represents the used range on the
specified worksheet. Read-only.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to get used range on the specified worksheet:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["B2"].Text = "Text";</para><para>//Set Color</para><para>worksheet["J3"].Style.Color = Color.Red;</para><para>//Get used range . Output will be B2:J3</para><para>Console.Write(worksheet.Range.RangeAddressLocal);</para><para>//Save to file</para><para>workbook.SaveToFile("UsedRange.xlsx");</para>
|
![]() |
RowColumnHeadersVisible |
True if row and column headers are visible;
False otherwise.
(Inherited from
IWorksheet
.)
|
![]() |
Rows |
For a Worksheet object, returns an array of Range objects that represents
all the rows on the specified worksheet. Read-only Range object.
(Inherited from
IWorksheet
.)
|
![]() |
TabColor |
Gets / sets tab color.
(Inherited from
ITabSheet
.)
|
![]() |
TabIndex |
Returns index in the parent ITabSheets collection. Read-only.
(Inherited from
ITabSheet
.)
|
![]() |
TabKnownColor |
Gets / sets tab color.
(Inherited from
ITabSheet
.)
|
![]() |
TextBoxes |
Returns collection with all textboxes inside this worksheet. Read-only.
(Inherited from
ITabSheet
.)
|
![]() ![]() |
TopVisibleRow |
Gets/sets top visible row of the worksheet.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to set the top visible row:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set top visible row</para><para>worksheet.TopVisibleRow = 5;</para><para>//Get top visible row</para><para>Console.Write(worksheet.TopVisibleRow);</para><para>//Save to file</para><para>workbook.SaveToFile("TopVisibleRow.xlsx");</para>
|
![]() |
Type |
Returns or sets the worksheet type. Read-only ExcelSheetType.
(Inherited from
IWorksheet
.)
|
![]() |
UseRangesCache |
Indicates whether all created range objects should be cached. Default value is false.
(Inherited from
IWorksheet
.)
|
![]() |
Version |
Gets the version of Excel.
|
![]() |
VerticalSplit |
Gets or sets the position of vertical split in the worksheet.
(Inherited from
IWorksheet
.)
|
![]() |
Visibility |
Control visibility of worksheet to end user.
(Inherited from
ITabSheet
.)
|
![]() |
VPageBreaks |
Returns a VPageBreaks collection that represents the vertical page
breaks on the sheet. Read-only.
(Inherited from
IWorksheet
.)
|
![]() |
Workbook |
Returns parent workbook. Read-only.
(Inherited from
ITabSheet
.)
|
![]() ![]() |
Zoom |
Zoom factor of document. Value must be in range from 10 till 400.
(Inherited from
IWorksheet
.)
![]()
The following code illustrates how to set zoom level of the sheet:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set zoom</para><para>worksheet.Zoom = 200;</para><para>//Save to file</para><para>workbook.SaveToFile("Zoom.xlsx");</para>
|