WorkbookSettings

WorkbookSettings class

Represents all settings of the workbook.

class WorkbookSettings;

Methods

MethodDescription
getAuthor()Gets and sets the author of the file.
setAuthor(string)Gets and sets the author of the file.
getCheckCustomNumberFormat()Indicates whether checking custom number format when setting Style.Custom.
setCheckCustomNumberFormat(boolean)Indicates whether checking custom number format when setting Style.Custom.
getEnableMacros()Enable macros;
setEnableMacros(boolean)Enable macros;
getDate1904()Gets or sets a value which represents if the workbook uses the 1904 date system.
setDate1904(boolean)Gets or sets a value which represents if the workbook uses the 1904 date system.
getProtectionType()Gets the protection type of the workbook.
getDisplayDrawingObjects()Indicates whether and how to show objects in the workbook.
setDisplayDrawingObjects(DisplayDrawingObjects)Indicates whether and how to show objects in the workbook.
getSheetTabBarWidth()Width of worksheet tab bar (in 1/1000 of window width).
setSheetTabBarWidth(number)Width of worksheet tab bar (in 1/1000 of window width).
getShowTabs()Get or sets a value whether the Workbook tabs are displayed.
setShowTabs(boolean)Get or sets a value whether the Workbook tabs are displayed.
getFirstVisibleTab()Gets or sets the first visible worksheet tab.
setFirstVisibleTab(number)Gets or sets the first visible worksheet tab.
isHScrollBarVisible()Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
setIsHScrollBarVisible(boolean)Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
isVScrollBarVisible()Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
setIsVScrollBarVisible(boolean)Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
getShared()Gets or sets a value that indicates whether the Workbook is shared.
setShared(boolean)Gets or sets a value that indicates whether the Workbook is shared.
getLanguageCode()Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
setLanguageCode(CountryCode)Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.
getRegion()Gets or sets the regional settings for workbook.
setRegion(CountryCode)Gets or sets the regional settings for workbook.
getGlobalizationSettings()Gets and sets the globalization settings.
setGlobalizationSettings(GlobalizationSettings)Gets and sets the globalization settings.
getNumberDecimalSeparator()Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
setNumberDecimalSeparator(string)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.
setNumberGroupSeparator(string)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.
getPassword()Represents Workbook file encryption password.
setPassword(string)Represents Workbook file encryption password.
getWriteProtection()Provides access to the workbook write protection options.
isEncrypted()Gets a value that indicates whether a password is required to open this workbook.
isProtected()Gets a value that indicates whether the structure or window of the Workbook is protected.
isDefaultEncrypted()Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
setIsDefaultEncrypted(boolean)Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
isMinimized()Represents whether the generated spreadsheet will be opened Minimized.
setIsMinimized(boolean)Represents whether the generated spreadsheet will be opened Minimized.
isHidden()Indicates whether this workbook is hidden.
setIsHidden(boolean)Indicates whether this workbook is hidden.
getAutoCompressPictures()Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
setAutoCompressPictures(boolean)Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
getRemovePersonalInformation()True if personal information can be removed from the specified workbook.
setRemovePersonalInformation(boolean)True if personal information can be removed from the specified workbook.
getHidePivotFieldList()Gets and sets whether hide the field list for the PivotTable.
setHidePivotFieldList(boolean)Gets and sets whether hide the field list for the PivotTable.
getUpdateLinksType()Gets and sets how updates external links when the workbook is opened.
setUpdateLinksType(UpdateLinksType)Gets and sets how updates external links when the workbook is opened.
getMaxRow()Gets the max row index, zero-based.
getMaxColumn()Gets the max column index, zero-based.
getDefaultStyleSettings()Gets the settings for default values of style-related properties for this workbook.
getWindowLeft()The distance from the left edge of the client area to the left edge of the window, in unit of point.
setWindowLeft(number)The distance from the left edge of the client area to the left edge of the window, in unit of point.
getWindowLeftInch()The distance from the left edge of the client area to the left edge of the window. In unit of inch.
setWindowLeftInch(number)The distance from the left edge of the client area to the left edge of the window. In unit of inch.
getWindowLeftCM()The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
setWindowLeftCM(number)The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
getWindowTop()The distance from the top edge of the client area to the top edge of the window, in unit of point.
setWindowTop(number)The distance from the top edge of the client area to the top edge of the window, in unit of point.
getWindowTopInch()The distance from the top edge of the client area to the top edge of the window, in unit of inch.
setWindowTopInch(number)The distance from the top edge of the client area to the top edge of the window, in unit of inch.
getWindowTopCM()The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
setWindowTopCM(number)The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.
getWindowWidth()The width of the window, in unit of point.
setWindowWidth(number)The width of the window, in unit of point.
getWindowWidthInch()The width of the window, in unit of inch.
setWindowWidthInch(number)The width of the window, in unit of inch.
getWindowWidthCM()The width of the window, in unit of centimeter.
setWindowWidthCM(number)The width of the window, in unit of centimeter.
getWindowHeight()The height of the window, in unit of point.
setWindowHeight(number)The height of the window, in unit of point.
getWindowHeightInch()The height of the window, in unit of inch.
setWindowHeightInch(number)The height of the window, in unit of inch.
getWindowHeightCM()The height of the window, in unit of centimeter.
setWindowHeightCM(number)The height of the window, in unit of centimeter.
getUpdateAdjacentCellsBorder()Indicates whether update adjacent cells’ border.
setUpdateAdjacentCellsBorder(boolean)Indicates whether update adjacent cells’ border.
getSignificantDigits()Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.
setSignificantDigits(number)Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.
getCheckCompatibility()Indicates whether check compatibility with earlier versions when saving workbook.
setCheckCompatibility(boolean)Indicates whether check compatibility with earlier versions when saving workbook.
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.
setCheckExcelRestriction(boolean)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.
getAutoRecover()Indicates whether the file is marked for auto-recovery.
setAutoRecover(boolean)Indicates whether the file is marked for auto-recovery.
getCrashSave()indicates whether the application last saved the workbook file after a crash.
setCrashSave(boolean)indicates whether the application last saved the workbook file after a crash.
getDataExtractLoad()indicates whether the application last opened the workbook for data recovery.
setDataExtractLoad(boolean)indicates whether the application last opened the workbook for data recovery.
getRepairLoad()Indicates whether the application last opened the workbook in safe or repair mode.
setRepairLoad(boolean)Indicates whether the application last opened the workbook in safe or repair mode.
getBuildVersion()Specifies the incremental public release of the application.
setBuildVersion(string)Specifies the incremental public release of the application.
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.
setMemorySetting(MemorySetting)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.
getPaperSize()Gets and sets the default print paper size.
setPaperSize(PaperSizeType)Gets and sets the default print paper size.
setWarningCallback(IWarningCallback)Gets or sets warning callback.
getWarningCallback()Gets or sets warning callback.
getMaxRowsOfSharedFormula()Gets and sets the max row number of shared formula.
setMaxRowsOfSharedFormula(number)Gets and sets the max row number of shared formula.
getCompliance()Specifies the OOXML version for the output document. The default value is Ecma376_2006.
setCompliance(OoxmlCompliance)Specifies the OOXML version for the output document. The default value is Ecma376_2006.
getQuotePrefixToStyle()Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell
setQuotePrefixToStyle(boolean)Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell
getFormulaSettings()Gets the settings for formula-related features.
dispose()Releases resources.
getThemeFont(FontSchemeType)Gets the default theme font name.
setPageOrientationType(PageOrientationType)Set the type of print orientation for the whole workbook.
isNull()Checks whether the implementation object is null.

getAuthor()

Gets and sets the author of the file.

getAuthor() : string;

Remarks

It’’s not set, check BuiltInDocumentPropertyCollection.Author first, then check the user of Environment.

setAuthor(string)

Gets and sets the author of the file.

setAuthor(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

It’’s not set, check BuiltInDocumentPropertyCollection.Author first, then check the user of Environment.

getCheckCustomNumberFormat()

Indicates whether checking custom number format when setting Style.Custom.

getCheckCustomNumberFormat() : boolean;

setCheckCustomNumberFormat(boolean)

Indicates whether checking custom number format when setting Style.Custom.

setCheckCustomNumberFormat(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getEnableMacros()

Enable macros;

getEnableMacros() : boolean;

Remarks

Now it only works when copying a worksheet to other worksheet in a workbook.

setEnableMacros(boolean)

Enable macros;

setEnableMacros(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Now it only works when copying a worksheet to other worksheet in a workbook.

getDate1904()

Gets or sets a value which represents if the workbook uses the 1904 date system.

getDate1904() : boolean;

setDate1904(boolean)

Gets or sets a value which represents if the workbook uses the 1904 date system.

setDate1904(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getProtectionType()

Gets the protection type of the workbook.

getProtectionType() : ProtectionType;

Returns

ProtectionType

getDisplayDrawingObjects()

Indicates whether and how to show objects in the workbook.

getDisplayDrawingObjects() : DisplayDrawingObjects;

Returns

DisplayDrawingObjects

setDisplayDrawingObjects(DisplayDrawingObjects)

Indicates whether and how to show objects in the workbook.

setDisplayDrawingObjects(value: DisplayDrawingObjects) : void;

Parameters:

ParameterTypeDescription
valueDisplayDrawingObjectsThe value to set.

getSheetTabBarWidth()

Width of worksheet tab bar (in 1/1000 of window width).

getSheetTabBarWidth() : number;

setSheetTabBarWidth(number)

Width of worksheet tab bar (in 1/1000 of window width).

setSheetTabBarWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getShowTabs()

Get or sets a value whether the Workbook tabs are displayed.

getShowTabs() : boolean;

Remarks

The default value is true.

setShowTabs(boolean)

Get or sets a value whether the Workbook tabs are displayed.

setShowTabs(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is true.

Example

The following code hides the Sheet Tabs and Tab Scrolling Buttons for the spreadsheet.

const { Workbook } = require("aspose.cells.node");

var workbook = new Workbook();
// Hide the spreadsheet tabs.
workbook.getSettings().setShowTabs(false);

getFirstVisibleTab()

Gets or sets the first visible worksheet tab.

getFirstVisibleTab() : number;

setFirstVisibleTab(number)

Gets or sets the first visible worksheet tab.

setFirstVisibleTab(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isHScrollBarVisible()

Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.

isHScrollBarVisible() : boolean;

Remarks

The default value is true.

Example

The following code makes the horizontal scroll bar invisible for the spreadsheet.

const { Workbook } = require("aspose.cells.node");

var workbook = new Workbook();
// Hide the horizontal scroll bar of the Excel file.
workbook.getSettings().setIsHScrollBarVisible(false);

setIsHScrollBarVisible(boolean)

Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.

setIsHScrollBarVisible(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is true.

isVScrollBarVisible()

Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.

isVScrollBarVisible() : boolean;

Remarks

The default value is true.

Example

The following code makes the vertical scroll bar invisible for the spreadsheet.

const { Workbook } = require("aspose.cells.node");

var workbook = new Workbook();
// Hide the vertical scroll bar of the Excel file.
workbook.getSettings().setIsVScrollBarVisible(false);

setIsVScrollBarVisible(boolean)

Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.

setIsVScrollBarVisible(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is true.

getShared()

Gets or sets a value that indicates whether the Workbook is shared.

getShared() : boolean;

Remarks

The default value is false.

setShared(boolean)

Gets or sets a value that indicates whether the Workbook is shared.

setShared(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false.

getLanguageCode()

Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.

getLanguageCode() : CountryCode;

Returns

CountryCode

setLanguageCode(CountryCode)

Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file.

setLanguageCode(value: CountryCode) : void;

Parameters:

ParameterTypeDescription
valueCountryCodeThe value to set.

getRegion()

Gets or sets the regional settings for workbook.

getRegion() : CountryCode;

Returns

CountryCode

Remarks

  1. Regional settings used by Aspose.Cells component for a workbook loaded from template file: i). For an XLS file, there are fields defined for regional settings and MS Excel does save regional settings data into the file when saving the XLS file. So, we use the saved region in the template file for the workbook. If you do not want to use the region saved in the XLS file, please reset it to the expected one (such as, CountryCode.Default) after loading the template file. And, we save the user specified value (by this method) into the file too when saving an XLS file. ii). For other file formats, such as, XLSX, XLSB…etc., there is no field defined for regional settings in the file format specification. So, we use the regional settings of application’s environment for the workbook. And, the user specified value (by this method) cannot be kept for the generated files with those file formats. 2. For the view effect in MS Excel: The applied regional settings here can take effect only at runtime with Aspose.Cells component and not when viewing the generated file with MS Excel. Even for the generated XLS file in which the specified regional settings data has been saved, when viewing/editing it with MS Excel, the used region to perform formatting by MS Excel is always the default regional settings of the environment where MS Excel is running, not the one saved in the file. It is MS Excel’s behavior and cannot be changed by code.

setRegion(CountryCode)

Gets or sets the regional settings for workbook.

setRegion(value: CountryCode) : void;

Parameters:

ParameterTypeDescription
valueCountryCodeThe value to set.

Remarks

  1. Regional settings used by Aspose.Cells component for a workbook loaded from template file: i). For an XLS file, there are fields defined for regional settings and MS Excel does save regional settings data into the file when saving the XLS file. So, we use the saved region in the template file for the workbook. If you do not want to use the region saved in the XLS file, please reset it to the expected one (such as, CountryCode.Default) after loading the template file. And, we save the user specified value (by this method) into the file too when saving an XLS file. ii). For other file formats, such as, XLSX, XLSB…etc., there is no field defined for regional settings in the file format specification. So, we use the regional settings of application’s environment for the workbook. And, the user specified value (by this method) cannot be kept for the generated files with those file formats. 2. For the view effect in MS Excel: The applied regional settings here can take effect only at runtime with Aspose.Cells component and not when viewing the generated file with MS Excel. Even for the generated XLS file in which the specified regional settings data has been saved, when viewing/editing it with MS Excel, the used region to perform formatting by MS Excel is always the default regional settings of the environment where MS Excel is running, not the one saved in the file. It is MS Excel’s behavior and cannot be changed by code.

getGlobalizationSettings()

Gets and sets the globalization settings.

getGlobalizationSettings() : GlobalizationSettings;

Returns

GlobalizationSettings

setGlobalizationSettings(GlobalizationSettings)

Gets and sets the globalization settings.

setGlobalizationSettings(value: GlobalizationSettings) : void;

Parameters:

ParameterTypeDescription
valueGlobalizationSettingsThe value to set.

getNumberDecimalSeparator()

Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.

getNumberDecimalSeparator() : string;

setNumberDecimalSeparator(string)

Gets or sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.

setNumberDecimalSeparator(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

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.

getNumberGroupSeparator() : string;

setNumberGroupSeparator(string)

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.

setNumberGroupSeparator(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getPassword()

Represents Workbook file encryption password.

getPassword() : string;

setPassword(string)

Represents Workbook file encryption password.

setPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getWriteProtection()

Provides access to the workbook write protection options.

getWriteProtection() : WriteProtection;

Returns

WriteProtection

isEncrypted()

Gets a value that indicates whether a password is required to open this workbook.

isEncrypted() : boolean;

isProtected()

Gets a value that indicates whether the structure or window of the Workbook is protected.

isProtected() : boolean;

isDefaultEncrypted()

Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.

isDefaultEncrypted() : boolean;

Remarks

The default value is false now. It’s same as MS Excel 2013.

setIsDefaultEncrypted(boolean)

Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.

setIsDefaultEncrypted(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false now. It’s same as MS Excel 2013.

isMinimized()

Represents whether the generated spreadsheet will be opened Minimized.

isMinimized() : boolean;

setIsMinimized(boolean)

Represents whether the generated spreadsheet will be opened Minimized.

setIsMinimized(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isHidden()

Indicates whether this workbook is hidden.

isHidden() : boolean;

setIsHidden(boolean)

Indicates whether this workbook is hidden.

setIsHidden(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAutoCompressPictures()

Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.

getAutoCompressPictures() : boolean;

setAutoCompressPictures(boolean)

Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.

setAutoCompressPictures(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRemovePersonalInformation()

True if personal information can be removed from the specified workbook.

getRemovePersonalInformation() : boolean;

setRemovePersonalInformation(boolean)

True if personal information can be removed from the specified workbook.

setRemovePersonalInformation(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getHidePivotFieldList()

Gets and sets whether hide the field list for the PivotTable.

getHidePivotFieldList() : boolean;

setHidePivotFieldList(boolean)

Gets and sets whether hide the field list for the PivotTable.

setHidePivotFieldList(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getUpdateLinksType()

Gets and sets how updates external links when the workbook is opened.

getUpdateLinksType() : UpdateLinksType;

Returns

UpdateLinksType

setUpdateLinksType(UpdateLinksType)

Gets and sets how updates external links when the workbook is opened.

setUpdateLinksType(value: UpdateLinksType) : void;

Parameters:

ParameterTypeDescription
valueUpdateLinksTypeThe value to set.

getMaxRow()

Gets the max row index, zero-based.

getMaxRow() : number;

Remarks

Returns 65535 if the file format is Excel97-2003;

getMaxColumn()

Gets the max column index, zero-based.

getMaxColumn() : number;

Remarks

Returns 255 if the file format is Excel97-2003;

getDefaultStyleSettings()

Gets the settings for default values of style-related properties for this workbook.

getDefaultStyleSettings() : DefaultStyleSettings;

Returns

DefaultStyleSettings

getWindowLeft()

The distance from the left edge of the client area to the left edge of the window, in unit of point.

getWindowLeft() : number;

setWindowLeft(number)

The distance from the left edge of the client area to the left edge of the window, in unit of point.

setWindowLeft(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowLeftInch()

The distance from the left edge of the client area to the left edge of the window. In unit of inch.

getWindowLeftInch() : number;

setWindowLeftInch(number)

The distance from the left edge of the client area to the left edge of the window. In unit of inch.

setWindowLeftInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowLeftCM()

The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.

getWindowLeftCM() : number;

setWindowLeftCM(number)

The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.

setWindowLeftCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowTop()

The distance from the top edge of the client area to the top edge of the window, in unit of point.

getWindowTop() : number;

setWindowTop(number)

The distance from the top edge of the client area to the top edge of the window, in unit of point.

setWindowTop(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowTopInch()

The distance from the top edge of the client area to the top edge of the window, in unit of inch.

getWindowTopInch() : number;

setWindowTopInch(number)

The distance from the top edge of the client area to the top edge of the window, in unit of inch.

setWindowTopInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowTopCM()

The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.

getWindowTopCM() : number;

setWindowTopCM(number)

The distance from the top edge of the client area to the top edge of the window, in unit of centimeter.

setWindowTopCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowWidth()

The width of the window, in unit of point.

getWindowWidth() : number;

setWindowWidth(number)

The width of the window, in unit of point.

setWindowWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowWidthInch()

The width of the window, in unit of inch.

getWindowWidthInch() : number;

setWindowWidthInch(number)

The width of the window, in unit of inch.

setWindowWidthInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowWidthCM()

The width of the window, in unit of centimeter.

getWindowWidthCM() : number;

setWindowWidthCM(number)

The width of the window, in unit of centimeter.

setWindowWidthCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowHeight()

The height of the window, in unit of point.

getWindowHeight() : number;

setWindowHeight(number)

The height of the window, in unit of point.

setWindowHeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowHeightInch()

The height of the window, in unit of inch.

getWindowHeightInch() : number;

setWindowHeightInch(number)

The height of the window, in unit of inch.

setWindowHeightInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWindowHeightCM()

The height of the window, in unit of centimeter.

getWindowHeightCM() : number;

setWindowHeightCM(number)

The height of the window, in unit of centimeter.

setWindowHeightCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getUpdateAdjacentCellsBorder()

Indicates whether update adjacent cells’ border.

getUpdateAdjacentCellsBorder() : boolean;

Remarks

The default value is false. For example: the bottom border of the cell A1 is update, the top border of the cell A2 should be changed too.

setUpdateAdjacentCellsBorder(boolean)

Indicates whether update adjacent cells’ border.

setUpdateAdjacentCellsBorder(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is false. For example: the bottom border of the cell A1 is update, the top border of the cell A2 should be changed too.

getSignificantDigits()

Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.

getSignificantDigits() : number;

Remarks

Only could be 15 or 17 now.

setSignificantDigits(number)

Gets and sets the number of significant digits. The default value is CellsHelper.SignificantDigits.

setSignificantDigits(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Only could be 15 or 17 now.

getCheckCompatibility()

Indicates whether check compatibility with earlier versions when saving workbook.

getCheckCompatibility() : boolean;

Remarks

The default value is true. Only for Excel97-2003 xls or xlt files.

setCheckCompatibility(boolean)

Indicates whether check compatibility with earlier versions when saving workbook.

setCheckCompatibility(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is true. Only for Excel97-2003 xls or xlt files.

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.

getCheckExcelRestriction() : boolean;

setCheckExcelRestriction(boolean)

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.

setCheckExcelRestriction(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAutoRecover()

Indicates whether the file is marked for auto-recovery.

getAutoRecover() : boolean;

setAutoRecover(boolean)

Indicates whether the file is marked for auto-recovery.

setAutoRecover(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getCrashSave()

indicates whether the application last saved the workbook file after a crash.

getCrashSave() : boolean;

setCrashSave(boolean)

indicates whether the application last saved the workbook file after a crash.

setCrashSave(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDataExtractLoad()

indicates whether the application last opened the workbook for data recovery.

getDataExtractLoad() : boolean;

setDataExtractLoad(boolean)

indicates whether the application last opened the workbook for data recovery.

setDataExtractLoad(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRepairLoad()

Indicates whether the application last opened the workbook in safe or repair mode.

getRepairLoad() : boolean;

setRepairLoad(boolean)

Indicates whether the application last opened the workbook in safe or repair mode.

setRepairLoad(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getBuildVersion()

Specifies the incremental public release of the application.

getBuildVersion() : string;

setBuildVersion(string)

Specifies the incremental public release of the application.

setBuildVersion(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

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.

getMemorySetting() : MemorySetting;

Returns

MemorySetting

setMemorySetting(MemorySetting)

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.

setMemorySetting(value: MemorySetting) : void;

Parameters:

ParameterTypeDescription
valueMemorySettingThe value to set.

getPaperSize()

Gets and sets the default print paper size.

getPaperSize() : PaperSizeType;

Returns

PaperSizeType

Remarks

If there is no setting about paper size,MS Excel will use default printer’s setting.

setPaperSize(PaperSizeType)

Gets and sets the default print paper size.

setPaperSize(value: PaperSizeType) : void;

Parameters:

ParameterTypeDescription
valuePaperSizeTypeThe value to set.

Remarks

If there is no setting about paper size,MS Excel will use default printer’s setting.

setWarningCallback(IWarningCallback)

Gets or sets warning callback.

setWarningCallback(value: IWarningCallback) : void;

Parameters:

ParameterTypeDescription
valueIWarningCallbackThe value to set.

getWarningCallback()

Gets or sets warning callback.

getWarningCallback() : IWarningCallback;

Returns

IWarningCallback

getMaxRowsOfSharedFormula()

Gets and sets the max row number of shared formula.

getMaxRowsOfSharedFormula() : number;

Remarks

If the number is too large, the autofilter works very slow in MS Excel 2013.

setMaxRowsOfSharedFormula(number)

Gets and sets the max row number of shared formula.

setMaxRowsOfSharedFormula(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

If the number is too large, the autofilter works very slow in MS Excel 2013.

getCompliance()

Specifies the OOXML version for the output document. The default value is Ecma376_2006.

getCompliance() : OoxmlCompliance;

Returns

OoxmlCompliance

Remarks

Only for .xlsx files.

setCompliance(OoxmlCompliance)

Specifies the OOXML version for the output document. The default value is Ecma376_2006.

setCompliance(value: OoxmlCompliance) : void;

Parameters:

ParameterTypeDescription
valueOoxmlComplianceThe value to set.

Remarks

Only for .xlsx files.

getQuotePrefixToStyle()

Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell

getQuotePrefixToStyle() : boolean;

setQuotePrefixToStyle(boolean)

Indicates whether setting Style.QuotePrefix property when entering the string value(which starts with single quote mark ) to the cell

setQuotePrefixToStyle(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getFormulaSettings()

Gets the settings for formula-related features.

getFormulaSettings() : FormulaSettings;

Returns

FormulaSettings

dispose()

Releases resources.

dispose() : void;

getThemeFont(FontSchemeType)

Gets the default theme font name.

getThemeFont(type: FontSchemeType) : string;

Parameters:

ParameterTypeDescription
typeFontSchemeTypeThe scheme type of the font.

setPageOrientationType(PageOrientationType)

Set the type of print orientation for the whole workbook.

setPageOrientationType(pageOrientationType: PageOrientationType) : void;

Parameters:

ParameterTypeDescription
pageOrientationTypePageOrientationTypeThe page orientation type

isNull()

Checks whether the implementation object is null.

isNull() : boolean;