WorkbookSettings class

WorkbookSettings class

Represents all settings of the workbook.

The WorkbookSettings type exposes the following members:

Properties

PropertyDescription
stream_providerGets and sets the stream provider for external resource.
resource_providerGets and sets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.
authorGets and sets the author of the file.
check_custom_number_formatIndicates whether checking custom number format when setting Style.Custom.
enable_macrosEnable macros;
date1904Gets or sets a value which represents if the workbook uses the 1904 date system.
protection_typeGets the protection type of the workbook.
display_drawing_objectsIndicates whether and how to show objects in the workbook.
sheet_tab_bar_widthWidth of worksheet tab bar (in 1/1000 of window width).
show_tabsGet or sets a value whether the Workbook tabs are displayed.
first_visible_tabGets or sets the first visible worksheet tab.
is_h_scroll_bar_visibleGets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
is_v_scroll_bar_visibleGets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
sharedGets or sets a value that indicates whether the Workbook is shared.
language_codeGets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
regionGets or sets the regional settings for workbook.
globalization_settingsGets and sets the globalization settings.
number_decimal_separatorGets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
number_group_separatorGets 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.
passwordRepresents Workbook file encryption password.
write_protectionProvides access to the workbook write protection options.
is_encryptedGets a value that indicates whether a password is required to open this workbook.
is_protectedGets a value that indicates whether the structure or window of the Workbook is protected.
is_default_encryptedIndicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
is_minimizedRepresents whether the generated spreadsheet will be opened Minimized.
is_hiddenIndicates whether this workbook is hidden.
auto_compress_picturesSpecifies a boolean value that indicates the application automatically compressed pictures in the workbook.
remove_personal_informationTrue if personal information can be removed from the specified workbook.
hide_pivot_field_listGets and sets whether hide the field list for the PivotTable.
update_links_typeGets and sets how updates external links when the workbook is opened.
max_rowGets the max row index, zero-based.
max_columnGets the max column index, zero-based.
default_style_settingsGets the settings for default values of style-related properties for this workbook.
window_leftThe distance from the left edge of the client area to the left edge of the window, in unit of point.
window_left_inchThe distance from the left edge of the client area to the left edge of the window.
In unit of inch.
window_left_cmThe distance from the left edge of the client area to the left edge of the window.
In unit of centimeter.
window_topThe distance from the top edge of the client area to the top edge of the window, in unit of point.
window_top_inchThe distance from the top edge of the client area to the top edge of the window, in unit of inch.
window_top_cmThe distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
window_widthThe width of the window, in unit of point.
window_width_inchThe width of the window, in unit of inch.
window_width_cmThe width of the window, in unit of centimeter.
window_heightThe height of the window, in unit of point.
window_height_inchThe height of the window, in unit of inch.
window_height_cmThe height of the window, in unit of centimeter.
update_adjacent_cells_borderIndicates whether update adjacent cells’ border.
significant_digitsGets and sets the number of significant digits.
The default value is CellsHelper.significant_digits.
check_compatibilityIndicates whether check compatibility with earlier versions when saving workbook.
check_excel_restrictionWhether 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.
auto_recoverIndicates whether the file is marked for auto-recovery.
crash_saveindicates whether the application last saved the workbook file after a crash.
data_extract_loadindicates whether the application last opened the workbook for data recovery.
repair_loadIndicates whether the application last opened the workbook in safe or repair mode.
build_versionSpecifies the incremental public release of the application.
memory_settingGets 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.
paper_sizeGets and sets the default print paper size.
warning_callbackGets or sets warning callback.
max_rows_of_shared_formulaGets and sets the max row number of shared formula.
complianceSpecifies the OOXML version for the output document. The default value is Ecma376_2006.
quote_prefix_to_styleIndicates whether setting Style.quote_prefix property when entering the string value(which starts with single quote mark ) to the cell
formula_settingsGets the settings for formula-related features.
properties_follow_chart_pointIndicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.
discard_image_edit_dataIndicates whether discarding editting image data.
default_image_resolutionGets and sets default resolution of image.

Methods

MethodDescription
get_theme_fontGets the default theme font name.
set_page_orientation_typeSet the type of print orientation for the whole workbook.

Example

from aspose.cells import Workbook

workbook = Workbook()
settings = workbook.settings

See Also