Aspose::Cells::WorkbookSettings class

WorkbookSettings class

Represents all settings of the workbook.

class WorkbookSettings

Methods

MethodDescription
Dispose()Releases resources.
GetAuthor()Gets and sets the author of the file.
GetAutoCompressPictures()Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
GetAutoRecover()Indicates whether the file is marked for auto-recovery.
GetBuildVersion()Specifies the incremental public release of the application.
GetCheckCompatibility()Indicates whether check compatibility with earlier versions when saving workbook.
GetCheckCustomNumberFormat()Indicates whether checking custom number format when setting Style.Custom.
GetCheckExcelRestriction()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.
GetCompliance()Specifies the OOXML version for the output document. The default value is Ecma376_2006.
GetCrashSave()indicates whether the application last saved the workbook file after a crash.
GetDataExtractLoad()indicates whether the application last opened the workbook for data recovery.
GetDate1904()Gets or sets a value which represents if the workbook uses the 1904 date system.
GetDisplayDrawingObjects()Indicates whether and how to show objects in the workbook.
GetEnableMacros()Enable macros;.
GetFirstVisibleTab()Gets or sets the first visible worksheet tab.
GetFormulaSettings()Gets the settings for formula-related features.
GetGlobalizationSettings()Gets and sets the globalization settings.
GetHidePivotFieldList()Gets and sets whether hide the field list for the PivotTable.
GetLanguageCode()Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
GetMaxColumn()Gets the max column index, zero-based.
GetMaxRow()Gets the max row index, zero-based.
GetMaxRowsOfSharedFormula()Gets and sets the max row number of shared formula.
GetMemorySetting()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.
GetNumberDecimalSeparator()Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
GetNumberGroupSeparator()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.
GetPaperSize()Gets and sets the default print paper size.
GetPassword()Represents Workbook file encryption password.
GetProtectionType()Gets the protection type of the workbook.
GetQuotePrefixToStyle()Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell.
GetRegion()Gets or sets the regional settings for workbook.
GetRemovePersonalInformation()True if personal information can be removed from the specified workbook.
GetRepairLoad()Indicates whether the application last opened the workbook in safe or repair mode.
GetShared()Gets or sets a value that indicates whether the Workbook is shared.
GetSheetTabBarWidth()Width of worksheet tab bar (in 1/1000 of window width).
GetShowTabs()Get or sets a value whether the Workbook tabs are displayed.
GetSignificantDigits()Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.
GetThemeFont(FontSchemeType type)Gets the default theme font name.
GetUpdateAdjacentCellsBorder()Indicates whether update adjacent cells’ border.
GetUpdateLinksType()Gets and sets how updates external links when the workbook is opened.
GetWarningCallback()Gets or sets warning callback.
GetWindowHeight()The height of the window, in unit of point.
GetWindowHeightCM()The height of the window, in unit of centimeter.
GetWindowHeightInch()The height of the window, in unit of inch.
GetWindowLeft()The distance from the left edge of the client area to the left edge of the window, in unit of point.
GetWindowLeftCM()The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
GetWindowLeftInch()The distance from the left edge of the client area to the left edge of the window. In unit of inch.
GetWindowTop()The distance from the top edge of the client area to the top edge of the window, in unit of point.
GetWindowTopCM()The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
GetWindowTopInch()The distance from the top edge of the client area to the top edge of the window, in unit of inch.
GetWindowWidth()The width of the window, in unit of point.
GetWindowWidthCM()The width of the window, in unit of centimeter.
GetWindowWidthInch()The width of the window, in unit of inch.
GetWriteProtection()Provides access to the workbook write protection options.
IsDefaultEncrypted()Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
IsEncrypted()Gets a value that indicates whether a password is required to open this workbook.
IsHidden()Indicates whether this workbook is hidden.
IsHScrollBarVisible()Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
IsMinimized()Represents whether the generated spreadsheet will be opened Minimized.
IsNull() constChecks whether the implementation object is nullptr.
IsProtected()Gets a value that indicates whether the structure or window of the Workbook is protected.
IsVScrollBarVisible()Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
explicit operator bool() constoperator bool()
operator=(const WorkbookSettings& src)operator=
SetAuthor(const U16String& value)Gets and sets the author of the file.
SetAuthor(const char16_t* value)Gets and sets the author of the file.
SetAutoCompressPictures(bool value)Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
SetAutoRecover(bool value)Indicates whether the file is marked for auto-recovery.
SetBuildVersion(const U16String& value)Specifies the incremental public release of the application.
SetBuildVersion(const char16_t* value)Specifies the incremental public release of the application.
SetCheckCompatibility(bool value)Indicates whether check compatibility with earlier versions when saving workbook.
SetCheckCustomNumberFormat(bool value)Indicates whether checking custom number format when setting Style.Custom.
SetCheckExcelRestriction(bool value)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.
SetCompliance(OoxmlCompliance value)Specifies the OOXML version for the output document. The default value is Ecma376_2006.
SetCrashSave(bool value)indicates whether the application last saved the workbook file after a crash.
SetDataExtractLoad(bool value)indicates whether the application last opened the workbook for data recovery.
SetDate1904(bool value)Gets or sets a value which represents if the workbook uses the 1904 date system.
SetDisplayDrawingObjects(DisplayDrawingObjects value)Indicates whether and how to show objects in the workbook.
SetEnableMacros(bool value)Enable macros;.
SetFirstVisibleTab(int32_t value)Gets or sets the first visible worksheet tab.
SetGlobalizationSettings(GlobalizationSettings* value)Gets and sets the globalization settings.
SetHidePivotFieldList(bool value)Gets and sets whether hide the field list for the PivotTable.
SetIsDefaultEncrypted(bool value)Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
SetIsHidden(bool value)Indicates whether this workbook is hidden.
SetIsHScrollBarVisible(bool value)Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
SetIsMinimized(bool value)Represents whether the generated spreadsheet will be opened Minimized.
SetIsVScrollBarVisible(bool value)Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
SetLanguageCode(CountryCode value)Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
SetMaxRowsOfSharedFormula(int32_t value)Gets and sets the max row number of shared formula.
SetMemorySetting(MemorySetting value)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.
SetNumberDecimalSeparator(char16_t value)Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
SetNumberGroupSeparator(char16_t value)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.
SetPageOrientationType(PageOrientationType pageOrientationType)Set the type of print orientation for the whole workbook.
SetPaperSize(PaperSizeType value)Gets and sets the default print paper size.
SetPassword(const U16String& value)Represents Workbook file encryption password.
SetPassword(const char16_t* value)Represents Workbook file encryption password.
SetQuotePrefixToStyle(bool value)Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell.
SetRegion(CountryCode value)Gets or sets the regional settings for workbook.
SetRemovePersonalInformation(bool value)True if personal information can be removed from the specified workbook.
SetRepairLoad(bool value)Indicates whether the application last opened the workbook in safe or repair mode.
SetShared(bool value)Gets or sets a value that indicates whether the Workbook is shared.
SetSheetTabBarWidth(int32_t value)Width of worksheet tab bar (in 1/1000 of window width).
SetShowTabs(bool value)Get or sets a value whether the Workbook tabs are displayed.
SetSignificantDigits(int32_t value)Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.
SetUpdateAdjacentCellsBorder(bool value)Indicates whether update adjacent cells’ border.
SetUpdateLinksType(UpdateLinksType value)Gets and sets how updates external links when the workbook is opened.
SetWarningCallback(IWarningCallback* value)Gets or sets warning callback.
SetWindowHeight(double value)The height of the window, in unit of point.
SetWindowHeightCM(double value)The height of the window, in unit of centimeter.
SetWindowHeightInch(double value)The height of the window, in unit of inch.
SetWindowLeft(double value)The distance from the left edge of the client area to the left edge of the window, in unit of point.
SetWindowLeftCM(double value)The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
SetWindowLeftInch(double value)The distance from the left edge of the client area to the left edge of the window. In unit of inch.
SetWindowTop(double value)The distance from the top edge of the client area to the top edge of the window, in unit of point.
SetWindowTopCM(double value)The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
SetWindowTopInch(double value)The distance from the top edge of the client area to the top edge of the window, in unit of inch.
SetWindowWidth(double value)The width of the window, in unit of point.
SetWindowWidthCM(double value)The width of the window, in unit of centimeter.
SetWindowWidthInch(double value)The width of the window, in unit of inch.
WorkbookSettings(WorkbookSettings_Impl* impl)Constructs from an implementation object.
WorkbookSettings(const WorkbookSettings& src)Copy constructor.
~WorkbookSettings()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
Workbook workbook;

WorkbookSettings settings = workbook.GetSettings();
Aspose::Cells::Cleanup();

See Also