Class WorkbookSettings

WorkbookSettings class

Represents all settings of the workbook.

public class WorkbookSettings : IDisposable

Properties

NameDescription
Author { get; set; }Gets and sets the author of the file.
AutoCompressPictures { get; set; }Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
AutoRecover { get; set; }Indicates whether the file is marked for auto-recovery.
BuildVersion { get; set; }Specifies the incremental public release of the application.
CheckCompatibility { get; set; }Indicates whether check compatibility with earlier versions when saving workbook.
CheckCustomNumberFormat { get; set; }Indicates whether checking custom number format when setting Style.Custom.
CheckExcelRestriction { get; set; }Whether check restriction of excel file when user modify cells related objects. For example, excel does not allow inputting string value longer than 32K. When you input a value longer than 32K such as by Cell.PutValue(string), if this property is true, you will get an Exception. If this property is false, we will accept your input string value as the cell’s value so that later you can output the complete string value for other file formats such as CSV. However, if you have set such kind of value that is invalid for excel file format, you should not save the workbook as excel file format later. Otherwise there may be unexpected error for the generated excel file.
Compliance { get; set; }Specifies the OOXML version for the output document. The default value is Ecma376_2006.
CrashSave { get; set; }indicates whether the application last saved the workbook file after a crash.
CultureInfo { get; set; }Gets or sets the system culture info.
DataExtractLoad { get; set; }indicates whether the application last opened the workbook for data recovery.
Date1904 { get; set; }Gets or sets a value which represents if the workbook uses the 1904 date system.
DefaultImageResolution { get; set; }Gets and sets default resolution of image.
DefaultStyleSettings { get; }Gets the settings for default values of style-related properties for this workbook.
DiscardImageEditData { get; set; }Indicates whether discarding editting image data.
DisplayDrawingObjects { get; set; }Indicates whether and how to show objects in the workbook.
EnableMacros { get; set; }Enable macros;
FirstVisibleTab { get; set; }Gets or sets the first visible worksheet tab.
FormulaSettings { get; }Gets the settings for formula-related features.
GlobalizationSettings { get; set; }Gets and sets the globalization settings.
HidePivotFieldList { get; set; }Gets and sets whether hide the field list for the PivotTable.
IsDefaultEncrypted { get; set; }Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
IsEncrypted { get; }Gets a value that indicates whether a password is required to open this workbook.
IsHidden { get; set; }Indicates whether this workbook is hidden.
IsHScrollBarVisible { get; set; }Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
IsMinimized { get; set; }Represents whether the generated spreadsheet will be opened Minimized.
IsProtected { get; }Gets a value that indicates whether the structure or window of the Workbook is protected.
IsVScrollBarVisible { get; set; }Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
LanguageCode { get; set; }Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
MaxColumn { get; }Gets the max column index, zero-based.
MaxRow { get; }Gets the max row index, zero-based.
MaxRowsOfSharedFormula { get; set; }Gets and sets the max row number of shared formula.
MemorySetting { get; set; }Gets or sets the memory usage options. The new option will be taken as the default option for newly created worksheets but does not take effect for existing worksheets.
NumberDecimalSeparator { get; set; }Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
NumberGroupSeparator { get; set; }Gets or sets the character that separates groups of digits to the left of the decimal in numeric values. Default is the group separator of current Region.
PaperSize { get; set; }Gets and sets the default print paper size.
Password { get; set; }Represents Workbook file encryption password.
PropertiesFollowChartPoint { get; set; }Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.
ProtectionType { get; }Gets the protection type of the workbook.
QuotePrefixToStyle { get; set; }Indicates whether setting QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell
Region { get; set; }Gets or sets the regional settings for workbook.
RemovePersonalInformation { get; set; }True if personal information can be removed from the specified workbook.
RepairLoad { get; set; }Indicates whether the application last opened the workbook in safe or repair mode.
ResourceProvider { get; set; }Gets and sets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.
Shared { get; set; }Gets or sets a value that indicates whether the Workbook is shared.
SheetTabBarWidth { get; set; }Width of worksheet tab bar (in 1/1000 of window width).
ShowTabs { get; set; }Get or sets a value whether the Workbook tabs are displayed.
SignificantDigits { get; set; }Gets and sets the number of significant digits. The default value is SignificantDigits.
StreamProvider { get; set; }(Obsolete.) Gets and sets the stream provider for external resource.
UpdateAdjacentCellsBorder { get; set; }Indicates whether update adjacent cells’ border.
UpdateLinksType { get; set; }Gets and sets how updates external links when the workbook is opened.
WarningCallback { get; set; }Gets or sets warning callback.
WindowHeight { get; set; }The height of the window, in unit of point.
WindowHeightCM { get; set; }The height of the window, in unit of centimeter.
WindowHeightInch { get; set; }The height of the window, in unit of inch.
WindowLeft { get; set; }The distance from the left edge of the client area to the left edge of the window, in unit of point.
WindowLeftCM { get; set; }The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
WindowLeftInch { get; set; }The distance from the left edge of the client area to the left edge of the window. In unit of inch.
WindowTop { get; set; }The distance from the top edge of the client area to the top edge of the window, in unit of point.
WindowTopCM { get; set; }The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
WindowTopInch { get; set; }The distance from the top edge of the client area to the top edge of the window, in unit of inch.
WindowWidth { get; set; }The width of the window, in unit of point.
WindowWidthCM { get; set; }The width of the window, in unit of centimeter.
WindowWidthInch { get; set; }The width of the window, in unit of inch.
WriteProtection { get; }Provides access to the workbook write protection options.

Methods

NameDescription
Dispose()Releases resources.
GetThemeFont(FontSchemeType)Gets the default theme font name.
SetPageOrientationType(PageOrientationType)Set the type of print orientation for the whole workbook.

Examples

[C#]

Workbook workbook = new Workbook();

WorkbookSettings settings = workbook.Settings;

//do your business

[Visual Basic]
Dim workbook as Workbook = new Workbook()

Dim settings as WorkbookSettings = workbook.Settings

'do your business

See Also