Workbook Properties |
The Workbook type exposes the following members.
Name | Description | |
---|---|---|
![]() |
ActiveSheet |
Returns an object that represents the active sheet (the sheet
on top) in the active workbook or in the specified window or
workbook. Returns Nothing if no sheet is active. Read-only.
|
![]() |
ActiveSheetIndex |
Gets or sets index of the active worksheet.
|
![]() |
AddInFunctions |
Returns collection of add-in functions.
|
![]() ![]() |
AIHelper |
helper for call AI.
|
![]() |
Allow3DRangesInDataValidation |
Indicates whether to allow usage of 3D ranges in DataValidation
list property (MS Excel doesn't allow).
|
![]() |
CalculationMode |
Get or set calculation mode.
|
![]() |
Charts |
Returns a Sheets collection that represents all the chart sheets in the specified workbook. Read-only.
|
![]() |
Chartsheets |
Gets a list of chartsheets in the Excel workbook.
|
![]() |
CheckComptiliblity |
Indicates whether check comptiliblity when saving workbook.
|
![]() |
CodeName |
Name which used by macros to access to workbook items.
|
![]() ![]() |
Colors |
Returns colors in the palette for the workbook. The palette has 56 entries, each represented by an RGB value. Read/write Object.
![]()
The following code illustrates how to access the default colors of excel color palette:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Get colors</para><para>System.Drawing.Color[] colors = workbook.Colors;</para><para>//Get color</para><para>System.Drawing.Color color = colors[2];</para><para>//Set color</para><para>worksheet["B2"].Style.Color = color;</para><para>//Save to file</para><para>workbook.SaveToFile("CellFormats.xlsx");</para>
|
![]() |
ConverterSetting |
Gets or sets the converter settings for the Excel workbook.
|
![]() |
CultureInfo |
Gets or sets the culture information used for formatting and parsing.
This setting is equivalent to setting the editing language of Excel.
|
![]() ![]() |
CustomDocumentProperties |
Returns collection that represents all the custom document properties
for the specified workbook. Read-only.
![]()
The following code snippet illustrates how to get the custom document properties:
<para>//Create workbook</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>//Get the document properties</para><para>ICustomDocumentProperties documentProperties = workbook.CustomDocumentProperties;</para>
|
![]() |
CustomFontFileDirectory |
Sets the custom directory of font files.
|
![]() |
CustomFontFilePaths |
Returns or sets the custom path of font files.
|
![]() |
CustomTableStyles |
Gets the custom table styles defined in the Excel workbook.
|
![]() |
DataConns |
Gets the collection of data connections associated with the workbook.
|
![]() |
DataSorter |
Gets Data sorter to sort the data..
|
![]() |
Date1904 |
True if the workbook uses the 1904 date system. Read/write Boolean.
|
![]() ![]() |
DefaultFontName |
Returns or sets the name of the default font.
![]()
The following code illustrates how to set the standard font for the workbook:
<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 standard font</para><para>workbook.DefaultFontName = "Arial";</para><para>//Set standard font size</para><para>workbook.DefaultFontSize = 18;</para><para>//Save to file</para><para>workbook.SaveToFile("CellFormats.xlsx");</para>
|
![]() ![]() |
DefaultFontSize |
Returns or sets the default font size.
![]()
The following code illustrates how to set the standard font size for the workbook:
<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 standard font</para><para>workbook.DefaultFontName = "Arial";</para><para>//Set standard font size</para><para>workbook.DefaultFontSize = 18;</para><para>//Save to file</para><para>workbook.SaveToFile("CellFormats.xlsx");</para>
|
![]() |
DisableMacrosStart |
Allows users to disable load of macros from document.
|
![]() ![]() |
DocumentProperties |
Returns a BuiltInDocumentProperties collection that represents all the built-in document properties for the specified workbook. Read-only.
![]()
The following code snippet illustrates how to get the built in document properties:
<para>//Create workbook</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>//Get the built in document properties</para><para>IBuiltInDocumentProperties builtInDocumentProperties = workbook.DocumentProperties;</para>
|
![]() |
ExternalLinks |
Gets the collection of external links in the workbook.
|
![]() |
FileName |
Gets file name.
|
![]() |
HasMacros |
Indicates whether contains VBA macros.
|
![]() |
HasTrackedChanges |
Indicates whether the workbook has any tracked changes
|
![]() |
IsCellProtection |
Indicates whether cells are protected.
|
![]() |
IsDigitallySigned |
Indicates whether this spreadsheet is digitally signed.
|
![]() |
IsHideWindow |
Hide window
|
![]() ![]() |
IsHScrollBarVisible |
Returns or sets whether show horizontal scroll bar.
![]()
This sample shows how to hide horizontal scroll bar:
<para>//Create workbook</para><para>Workbook workbook = new Workbook();</para><para>//Hide horizontal scroll bar</para><para>workbook.IsHScrollBarVisible = false;</para><para>//Save to file</para><para>workbook.SaveToFile("IsHScrollBarVisible.xlsx");</para>
|
![]() |
IsRightToLeft |
Indicates whether worksheet is displayed right to left.
|
![]() |
IsSaved |
Indicates whether workbook changes have been saved.
|
![]() ![]() |
IsVScrollBarVisible |
Returns or sets whether show vertical scroll bar.
![]()
This sample shows how to hide vertical scroll bar:
<para>//Create workbook</para><para>Workbook workbook = new Workbook();</para><para>//Hide vertical scroll bar</para><para>workbook.IsVScrollBarVisible = false;</para><para>//Save to file</para><para>workbook.SaveToFile("IsVScrollBarVisible.xlsx");</para>
|
![]() |
IsWindowProtection |
Indicates window is protected.
|
![]() |
MarkerDesigner |
Gets the MarkerDesigner instance.
|
![]() |
MaxColumnCount |
Returns maximum column count for each worksheet in this workbook. Read-only.
|
![]() |
MaxDigitWidth |
Gets the maximum digit width in the Excel workbook.
|
![]() |
MaxRowCount |
Returns maximum row count for each worksheet in this workbook. Read-only.
|
![]() |
MaxRowsOfSharedFormula |
Gets or sets the maximum number of rows for shared formulas in the workbook.
|
![]() ![]() |
NameRanges |
Gets Names collection that represents all the names in the specified
workbook.
![]()
The following code snippet illustrates how to get names:
<para>//Create workbook</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>//Get names</para><para>INameRanges names = workbook.NameRanges;</para>
|
![]() |
OpenPassword |
Returns or sets password to encrypt document.
|
![]() |
OptimizeImport |
Indicates whether to optimize Import data. This option will
take effect only on Import methods that are available with the worksheet
WARNING: Setting this property to True can decrease memory significantly,
but will increase the performance of data import .
|
![]() ![]() |
PivotCaches |
Returns pivot caches collection. Read-only.
![]()
The following code snippet illustrates how to get pivot caches:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Gets pivot caches collection</para><para>IPivotCaches pivotCaches = workbook.PivotCaches;</para>
|
![]() |
PrintDialog |
Sets the print dialog for the current instance.
|
![]() |
PrintDocument |
Gets the PrintDocument
|
![]() |
ProhibitDtd |
prohibt dtd processing switch
|
![]() |
ReadOnly |
Indicates whether the workbook has been opened as Read-only.
|
![]() |
SelectedTab |
Gets or sets tab index of selected.
|
![]() |
SheetTabBarWidth |
Returns or sets the width of worksheet tab bar. 1/1000 of window width.
|
![]() |
ShowTabs |
Get or sets a value whether the Workbook tabs are displayed.
|
![]() ![]() |
Styles |
Returns a Styles collection that represents all the styles in the specified workbook. Read-only.
![]()
The following code snippet illustrates how to get the Styles:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set styles</para><para>IStyles styles = workbook.Styles;</para>
|
![]() |
TrackedChanges |
Turn revision mode on or off.
|
![]() |
UseStorageMode |
User Compound storage mode
|
![]() |
Version |
Gets or sets the version of the Excel workbook.
|
![]() |
Worksheets |
Returns a Sheets collection that represents all the worksheets in the specified workbook. Read-only Sheets object.
|
![]() |
WriteProtection |
Returns options of the workbook write protection.
|