Worksheet Class

Worksheet class

Encapsulates the object that represents a single worksheet.


type Worksheet struct  {
	ptr unsafe.Pointer
}

Constructors

MethodDescription

Methods

MethodDescription
IsNullChecks whether the implementation object is nullptr.
DisposePerforms application-defined tasks associated with freeing, releasing, orresetting unmanaged resources.
GetProtectionRepresents the various types of protection options available for a worksheet. Supports advanced protection options in ExcelXP and above version.
GetUniqueIdGets and sets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}.
SetUniqueIdGets and sets the unique id, it is same as {15DB5C3C-A5A1-48AF-8F25-3D86AC232D4F}.
GetPanesGets the window panes.
GetWorkbookGets the workbook object which contains this sheet.
GetCellsGets the collection.
GetQueryTablesGets in the worksheet.
GetPivotTablesGets all pivot tables in this worksheet.
GetTypeRepresents worksheet type.
SetTypeRepresents worksheet type.
GetNameGets or sets the name of the worksheet.
SetNameGets or sets the name of the worksheet.
GetShowFormulasIndicates whether to show formulas or their results.
SetShowFormulasIndicates whether to show formulas or their results.
IsGridlinesVisibleGets or sets a value indicating whether the gridlines are visible.Default is true.
SetIsGridlinesVisibleGets or sets a value indicating whether the gridlines are visible.Default is true.
IsRowColumnHeadersVisibleGets or sets a value indicating whether the worksheet will display row and column headers.Default is true.
SetIsRowColumnHeadersVisibleGets or sets a value indicating whether the worksheet will display row and column headers.Default is true.
GetPaneStateIndicates whether the pane has horizontal or vertical splits, and whether those splits are frozen.
GetDisplayZerosTrue if zero values are displayed.
SetDisplayZerosTrue if zero values are displayed.
GetDisplayRightToLeftIndicates if the specified worksheet is displayed from right to left instead of from left to right.Default is false.
SetDisplayRightToLeftIndicates if the specified worksheet is displayed from right to left instead of from left to right.Default is false.
IsOutlineShownIndicates whether to show outline.
SetIsOutlineShownIndicates whether to show outline.
IsSelectedIndicates whether this worksheet is selected when the workbook is opened.
SetIsSelectedIndicates whether this worksheet is selected when the workbook is opened.
FreezePanes_Int_Int_Int_IntFreezes panes at the specified cell in the worksheet.
GetFreezedPanesGets the freeze panes.
SplitSplits window.
FreezePanes_String_Int_IntFreezes panes at the specified cell in the worksheet.
UnFreezePanesUnfreezes panes in the worksheet.
RemoveSplitRemoves split window.
GetListObjectsGets all ListObjects in this worksheet.
GetTabIdSpecifies the internal identifier for the sheet.
SetTabIdSpecifies the internal identifier for the sheet.
GetHorizontalPageBreaksGets the collection.
GetVerticalPageBreaksGets the collection.
AddPageBreaksAdds page break.
GetHyperlinksGets the collection.
Copy_WorksheetCopies contents and formats from another worksheet.
Copy_Worksheet_CopyOptionsCopies contents and formats from another worksheet.
AutoFitColumn_Int_Int_IntAutofits the column width.
AutoFitColumnsAutofits all columns in this worksheet.
AutoFitColumns_AutoFitterOptionsAutofits all columns in this worksheet.
AutoFitColumn_IntAutofits the column width.
AutoFitColumns_Int_IntAutofits the columns width.
AutoFitColumns_Int_Int_AutoFitterOptionsAutofits the columns width.
AutoFitColumns_Int_Int_Int_IntAutofits the columns width.
AutoFitColumns_Int_Int_Int_Int_AutoFitterOptionsAutofits the columns width.
AutoFitRow_Int_Int_IntAutofits the row height.
AutoFitRow_Int_Int_Int_AutoFitterOptionsAutofits the row height.
AutoFitRowsAutofits all rows in this worksheet.
AutoFitRows_BoolAutofits all rows in this worksheet.
AutoFitRows_AutoFitterOptionsAutofits all rows in this worksheet.
AutoFitRows_Int_IntAutofits row height in a range.
AutoFitRows_Int_Int_AutoFitterOptionsAutofits row height in a range.
AutoFitRow_Int_Int_Int_IntAutofits row height in a rectangle range.
AutoFitRow_IntAutofits the row height.
GetPageSetupRepresents the page setup description in this sheet.
GetAutoFilterRepresents auto filter for the specified worksheet.
GetAdvancedFilterGets the settings of advanced filter.
Advanced_FilterFilters data using complex criteria.
RemoveAutoFilterRemoves the auto filter of the worksheet.
GetHasAutofilterIndicates whether this worksheet has auto filter.
GetTransitionEvaluationIndicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled.
SetTransitionEvaluationIndicates whether the Transition Formula Evaluation (Lotus compatibility) option is enabled.
GetTransitionEntryIndicates whether the Transition Formula Entry (Lotus compatibility) option is enabled.
SetTransitionEntryIndicates whether the Transition Formula Entry (Lotus compatibility) option is enabled.
GetVisibilityTypeIndicates the visible state for this sheet.
SetVisibilityTypeIndicates the visible state for this sheet.
SetVisibleSets the visible options.
IsVisibleRepresents if the worksheet is visible.
SetIsVisibleRepresents if the worksheet is visible.
SelectRangeSelects a range.
RemoveAllDrawingObjectsRemoves all drawing objects in this worksheet.
ClearCommentsClears all comments in designer spreadsheet.
GetSparklineGroupsGets the sparkline groups in the worksheet.
GetChartsGets a collection
GetCommentsGets the collection.
GetPicturesGets a collection.
GetTextBoxesGets a collection.
GetCheckBoxesGets a collection.
GetOleObjectsRepresents a collection of in a worksheet.
GetShapesReturns all drawing shapes in this worksheet.
GetSlicersGet the Slicer collection in the worksheet
GetTimelinesGet the Timeline collection in the worksheet
Protect_ProtectionTypeProtects worksheet.
Protect_ProtectionType_String_StringProtects worksheet.
UnprotectUnprotects worksheet.
Unprotect_StringUnprotects worksheet.
GetIndexGets the index of sheet in the worksheet collection.
MoveToMoves the sheet to another location in the spreadsheet.
IsProtectedIndicates if the worksheet is protected.
GetValidationsGets the data validation setting collection in the worksheet.
GetAllowEditRangesGets the allow edit range collection in the worksheet.
GetErrorCheckOptionsGets error check setting applied on certain ranges.
GetOutlineGets the outline on this worksheet.
GetFirstVisibleRowRepresents first visible row index.
SetFirstVisibleRowRepresents first visible row index.
GetFirstVisibleColumnRepresents first visible column index.
SetFirstVisibleColumnRepresents first visible column index.
ReplaceReplaces all cells’ text with a new string.
GetZoomRepresents the scaling factor in percentage. It should be between 10 and 400.
SetZoomRepresents the scaling factor in percentage. It should be between 10 and 400.
GetViewTypeGets and sets the view type.
SetViewTypeGets and sets the view type.
IsPageBreakPreviewIndicates whether the specified worksheet is shown in normal view or page break preview.
SetIsPageBreakPreviewIndicates whether the specified worksheet is shown in normal view or page break preview.
IsRulerVisibleIndicates whether the ruler is visible. This property is only applied for page break preview.
SetIsRulerVisibleIndicates whether the ruler is visible. This property is only applied for page break preview.
GetTabColorRepresents worksheet tab color.
SetTabColorRepresents worksheet tab color.
GetCodeNameGets worksheet code name.
SetCodeNameGets worksheet code name.
GetConditionalFormattingsGets the ConditionalFormattings in the worksheet.
GetActiveCellGets or sets the active cell in the worksheet.
SetActiveCellGets or sets the active cell in the worksheet.
GetCustomPropertiesGets an object representingthe identifier information associated with a worksheet.
GetSmartTagSettingGets all objects of the worksheet.
ToStringReturns a string represents the current Worksheet object.
GetScenariosGets the collection of .
StartAccessCacheStarts the session that uses caches to access the data in this worksheet.
CloseAccessCacheCloses the session that uses caches to access the data in this worksheet.
ConvertFormulaReferenceStyleConverts the formula reference style.
CalculateFormula_StringCalculates a formula.
CalculateFormula_String_CalculationOptionsCalculates a formula expression directly.
CalculateFormula_String_FormulaParseOptions_CalculationOptions_Int_Int_CalculationDataCalculates a formula expression directly.
CalculateFormula_CalculationOptions_BoolCalculates all formulas in this worksheet.
GetCellWatchesGets collection of cells on this worksheet being watched in the ‘watch window’.
RefreshPivotTablesRefreshes all the PivotTables in this Worksheet.
RefreshPivotTables_PivotTableRefreshOptionRefreshes all the PivotTables in this Worksheet.