WorkbookSettings

Inheritance: java.lang.Object

public class WorkbookSettings

Represents all settings of the workbook.

Example

         Workbook workbook = new Workbook();
 
         WorkbookSettings settings = workbook.getSettings();
 
         //do your business

Methods

MethodDescription
dispose()Releases resources.
equals(Object arg0)
getAuthor()Gets 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.
getClass()
getCompliance()Specifies the OOXML version for the output document.
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 a value which represents if the workbook uses the 1904 date system.
getDefaultImageResolution()Gets default resolution of image.
getDefaultStyleSettings()Gets the settings for default values of style-related properties for this workbook.
getDiscardImageEditData()Indicates whether discarding editting image data.
getDisplayDrawingObjects()Indicates whether and how to show objects in the workbook.
getEnableMacros()Enable macros;
getFirstVisibleTab()Gets the first visible worksheet tab.
getFormulaSettings()Gets the settings for formula-related features.
getGlobalizationSettings()Gets the globalization settings.
getHidePivotFieldList()Gets whether hide the field list for the PivotTable.
getLanguageCode()Gets the user interface language of the Workbook version based on CountryCode that has saved the file.
getLocale()Gets the Locale used by this workbook.
getMaxColumn()Gets the max column index, zero-based.
getMaxRow()Gets the max row index, zero-based.
getMaxRowsOfSharedFormula()Gets the max row number of shared formula.
getMemorySetting()Gets the memory usage options.
getNumberDecimalSeparator()Gets the decimal separator for formatting/parsing numeric values.
getNumberGroupSeparator()Gets the character that separates groups of digits to the left of the decimal in numeric values.
getPaperSize()Gets the default print paper size.
getPassword()Represents Workbook file encryption password.
getPropertiesFollowChartPoint()Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.
getProtectionType()Gets the protection type of the workbook.
getQuotePrefixToStyle()Indicates whether setting Style.getQuotePrefix() property when entering the string value(which starts with single quote mark ) to the cell
getRegion()Gets 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.
getResourceProvider()Gets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.
getShared()Gets a value that indicates whether the Workbook is shared.
getSheetTabBarWidth()Width of worksheet tab bar (in 1/1000 of window width).
getShowTabs()Gets a value whether the Workbook tabs are displayed.
getSignificantDigits()Gets the number of significant digits.
getStreamProvider()Gets the stream provider for external resource.
getThemeFont(int type)Gets the default theme font name.
getUpdateAdjacentCellsBorder()Indicates whether update adjacent cells’ border.
getUpdateLinksType()Gets how updates external links when the workbook is opened.
getWarningCallback()Gets 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.
getWindowLeftInch()The distance from the left edge of the client area to the left edge of the window.
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.
hashCode()
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.
isHScrollBarVisible()Gets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
isHidden()Indicates whether this workbook is hidden.
isMinimized()Represents whether the generated spreadsheet will be opened Minimized.
isProtected()Gets a value that indicates whether the structure or window of the Workbook is protected.
isVScrollBarVisible()Gets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
notify()
notifyAll()
setAuthor(String value)Sets the author of the file.
setAutoCompressPictures(boolean value)Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
setAutoRecover(boolean value)Indicates whether the file is marked for auto-recovery.
setBuildVersion(String value)Specifies the incremental public release of the application.
setCheckCompatibility(boolean value)Indicates whether check compatibility with earlier versions when saving workbook.
setCheckCustomNumberFormat(boolean value)Indicates whether checking custom number format when setting Style.Custom.
setCheckExcelRestriction(boolean value)Whether check restriction of excel file when user modify cells related objects.
setCompliance(int value)Specifies the OOXML version for the output document.
setCrashSave(boolean value)indicates whether the application last saved the workbook file after a crash.
setDataExtractLoad(boolean value)indicates whether the application last opened the workbook for data recovery.
setDate1904(boolean value)Sets a value which represents if the workbook uses the 1904 date system.
setDefaultEncrypted(boolean value)Indicates whether encrypting the workbook with default password if Structure and Windows of the workbook are locked.
setDefaultImageResolution(int value)Sets default resolution of image.
setDiscardImageEditData(boolean value)Indicates whether discarding editting image data.
setDisplayDrawingObjects(int value)Indicates whether and how to show objects in the workbook.
setEnableMacros(boolean value)Enable macros;
setFirstVisibleTab(int value)Sets the first visible worksheet tab.
setGlobalizationSettings(GlobalizationSettings value)Sets the globalization settings.
setHScrollBarVisible(boolean value)Sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
setHidden(boolean value)Indicates whether this workbook is hidden.
setHidePivotFieldList(boolean value)Sets whether hide the field list for the PivotTable.
setLanguageCode(int value)Sets the user interface language of the Workbook version based on CountryCode that has saved the file.
setLocale(Locale value)Sets the Locale used by this workbook.
setMaxRowsOfSharedFormula(int value)Sets the max row number of shared formula.
setMemorySetting(int value)Sets the memory usage options.
setMinimized(boolean value)Represents whether the generated spreadsheet will be opened Minimized.
setNumberDecimalSeparator(char value)Sets the decimal separator for formatting/parsing numeric values.
setNumberGroupSeparator(char value)Sets the character that separates groups of digits to the left of the decimal in numeric values.
setPageOrientationType(int pageOrientationType)Set the type of print orientation for the whole workbook.
setPaperSize(int value)Sets the default print paper size.
setPassword(String value)Represents Workbook file encryption password.
setPropertiesFollowChartPoint(boolean value)Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.
setQuotePrefixToStyle(boolean value)Indicates whether setting Style.getQuotePrefix() property when entering the string value(which starts with single quote mark ) to the cell
setRegion(int value)Sets the regional settings for workbook.
setRemovePersonalInformation(boolean value)True if personal information can be removed from the specified workbook.
setRepairLoad(boolean value)Indicates whether the application last opened the workbook in safe or repair mode.
setResourceProvider(IStreamProvider value)Sets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.
setShared(boolean value)Sets a value that indicates whether the Workbook is shared.
setSheetTabBarWidth(int value)Width of worksheet tab bar (in 1/1000 of window width).
setShowTabs(boolean value)Sets a value whether the Workbook tabs are displayed.
setSignificantDigits(int value)Sets the number of significant digits.
setStreamProvider(IStreamProvider value)Sets the stream provider for external resource.
setUpdateAdjacentCellsBorder(boolean value)Indicates whether update adjacent cells’ border.
setUpdateLinksType(int value)Sets how updates external links when the workbook is opened.
setVScrollBarVisible(boolean value)Sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
setWarningCallback(IWarningCallback value)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.
setWindowLeftInch(double value)The distance from the left edge of the client area to the left edge of the window.
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.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

dispose()

public void dispose()

Releases resources.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAuthor()

public String getAuthor()

Gets the author of the file.

Remarks

It’’s not set, check BuiltInDocumentPropertyCollection.getAuthor() first, then check the user of Environment.

Returns: java.lang.String

getAutoCompressPictures()

public boolean getAutoCompressPictures()

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

Returns: boolean

getAutoRecover()

public boolean getAutoRecover()

Indicates whether the file is marked for auto-recovery.

Returns: boolean

getBuildVersion()

public String getBuildVersion()

Specifies the incremental public release of the application.

Returns: java.lang.String

getCheckCompatibility()

public boolean getCheckCompatibility()

Indicates whether check compatibility with earlier versions when saving workbook.

Remarks

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

Returns: boolean

getCheckCustomNumberFormat()

public boolean getCheckCustomNumberFormat()

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

Returns: boolean

getCheckExcelRestriction()

public boolean 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.

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCompliance()

public int getCompliance()

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

See OoxmlCompliance.

Remarks

Only for .xlsx files.

Returns: int

getCrashSave()

public boolean getCrashSave()

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

Returns: boolean

getDataExtractLoad()

public boolean getDataExtractLoad()

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

Returns: boolean

getDate1904()

public boolean getDate1904()

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

Returns: boolean

getDefaultImageResolution()

public int getDefaultImageResolution()

Gets default resolution of image.

Returns: int

getDefaultStyleSettings()

public DefaultStyleSettings getDefaultStyleSettings()

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

Returns: DefaultStyleSettings

getDiscardImageEditData()

public boolean getDiscardImageEditData()

Indicates whether discarding editting image data.

Returns: boolean

getDisplayDrawingObjects()

public int getDisplayDrawingObjects()

Indicates whether and how to show objects in the workbook.

See DisplayDrawingObjects.

Returns: int

getEnableMacros()

public boolean getEnableMacros()

Enable macros;

Remarks

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

Returns: boolean

getFirstVisibleTab()

public int getFirstVisibleTab()

Gets the first visible worksheet tab.

Returns: int

getFormulaSettings()

public FormulaSettings getFormulaSettings()

Gets the settings for formula-related features.

Returns: FormulaSettings

getGlobalizationSettings()

public GlobalizationSettings getGlobalizationSettings()

Gets the globalization settings.

Returns: GlobalizationSettings

getHidePivotFieldList()

public boolean getHidePivotFieldList()

Gets whether hide the field list for the PivotTable.

Returns: boolean

getLanguageCode()

public int getLanguageCode()

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

See CountryCode.

Returns: int

getLocale()

public Locale getLocale()

Gets the Locale used by this workbook.

Remarks

Returns null if neither Locale nor getRegion() is set.

Returns: java.util.Locale

getMaxColumn()

public int getMaxColumn()

Gets the max column index, zero-based.

Remarks

Returns 255 if the file format is Excel97-2003;

Returns: int

getMaxRow()

public int getMaxRow()

Gets the max row index, zero-based.

Remarks

Returns 65535 if the file format is Excel97-2003;

Returns: int

getMaxRowsOfSharedFormula()

public int getMaxRowsOfSharedFormula()

Gets the max row number of shared formula.

Remarks

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

Returns: int

getMemorySetting()

public int getMemorySetting()

Gets 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.

See MemorySetting.

Returns: int

getNumberDecimalSeparator()

public char getNumberDecimalSeparator()

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

Returns: char

getNumberGroupSeparator()

public char getNumberGroupSeparator()

Gets the character that separates groups of digits to the left of the decimal in numeric values. Default is the group separator of current Region.

Returns: char

getPaperSize()

public int getPaperSize()

Gets the default print paper size.

See PaperSizeType.

Remarks

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

Returns: int

getPassword()

public String getPassword()

Represents Workbook file encryption password.

Returns: java.lang.String

getPropertiesFollowChartPoint()

public boolean getPropertiesFollowChartPoint()

Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.

Returns: boolean

getProtectionType()

public int getProtectionType()

Gets the protection type of the workbook.

See ProtectionType.

Returns: int

getQuotePrefixToStyle()

public boolean getQuotePrefixToStyle()

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

Returns: boolean

getRegion()

public int getRegion()

Gets the regional settings for workbook.

See 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.

Returns: int

getRemovePersonalInformation()

public boolean getRemovePersonalInformation()

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

Remarks

Returns: boolean

getRepairLoad()

public boolean getRepairLoad()

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

Returns: boolean

getResourceProvider()

public IStreamProvider getResourceProvider()

Gets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.

Returns: IStreamProvider

getShared()

public boolean getShared()

Gets a value that indicates whether the Workbook is shared.

Remarks

The default value is false.

Returns: boolean

getSheetTabBarWidth()

public int getSheetTabBarWidth()

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

Returns: int

getShowTabs()

public boolean getShowTabs()

Gets a value whether the Workbook tabs are displayed.

Remarks

The default value is true.

Example

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

         // Hide the spreadsheet tabs.
         workbook.getSettings().setShowTabs(false);

Returns: boolean

getSignificantDigits()

public int getSignificantDigits()

Gets the number of significant digits. The default value is CellsHelper.getSignificantDigits().

Remarks

Only could be 15 or 17 now.

Returns: int

getStreamProvider()

public IStreamProvider getStreamProvider()

Gets the stream provider for external resource.

Remarks

NOTE: This member is now obsolete. Instead, please use ResourceProvider property. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced.

Returns: IStreamProvider

getThemeFont(int type)

public String getThemeFont(int type)

Gets the default theme font name.

Parameters:

ParameterTypeDescription
typeintFontSchemeType. The scheme type of the font.

Returns: java.lang.String -

getUpdateAdjacentCellsBorder()

public boolean getUpdateAdjacentCellsBorder()

Indicates whether update adjacent cells’ border.

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.

Returns: boolean

getUpdateLinksType()

public int getUpdateLinksType()

Gets how updates external links when the workbook is opened.

See UpdateLinksType.

Returns: int

getWarningCallback()

public IWarningCallback getWarningCallback()

Gets warning callback.

Returns: IWarningCallback

getWindowHeight()

public double getWindowHeight()

The height of the window, in unit of point.

Returns: double

getWindowHeightCM()

public double getWindowHeightCM()

The height of the window, in unit of centimeter.

Returns: double

getWindowHeightInch()

public double getWindowHeightInch()

The height of the window, in unit of inch.

Returns: double

getWindowLeft()

public double getWindowLeft()

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

Returns: double

getWindowLeftCM()

public double getWindowLeftCM()

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

Returns: double

getWindowLeftInch()

public double getWindowLeftInch()

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

Returns: double

getWindowTop()

public double getWindowTop()

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

Returns: double

getWindowTopCM()

public double getWindowTopCM()

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

Returns: double

getWindowTopInch()

public double getWindowTopInch()

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

Returns: double

getWindowWidth()

public double getWindowWidth()

The width of the window, in unit of point.

Returns: double

getWindowWidthCM()

public double getWindowWidthCM()

The width of the window, in unit of centimeter.

Returns: double

getWindowWidthInch()

public double getWindowWidthInch()

The width of the window, in unit of inch.

Returns: double

getWriteProtection()

public WriteProtection getWriteProtection()

Provides access to the workbook write protection options.

Returns: WriteProtection

hashCode()

public native int hashCode()

Returns: int

isDefaultEncrypted()

public boolean isDefaultEncrypted()

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

Remarks

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

Returns: boolean

isEncrypted()

public boolean isEncrypted()

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

Returns: boolean

isHScrollBarVisible()

public boolean isHScrollBarVisible()

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

Remarks

The default value is true.

Example

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

         // Hide the horizontal scroll bar of the Excel file.
         settings.setHScrollBarVisible(false);

Returns: boolean

isHidden()

public boolean isHidden()

Indicates whether this workbook is hidden.

Returns: boolean

isMinimized()

public boolean isMinimized()

Represents whether the generated spreadsheet will be opened Minimized.

Returns: boolean

isProtected()

public boolean isProtected()

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

Returns: boolean

isVScrollBarVisible()

public boolean isVScrollBarVisible()

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

Remarks

The default value is true.

Example

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

         	// Hide the vertical scroll bar of the Excel file.
         settings.setVScrollBarVisible(false);

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAuthor(String value)

public void setAuthor(String value)

Sets the author of the file.

Remarks

It’’s not set, check BuiltInDocumentPropertyCollection.getAuthor() first, then check the user of Environment.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAutoCompressPictures(boolean value)

public void setAutoCompressPictures(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setAutoRecover(boolean value)

public void setAutoRecover(boolean value)

Indicates whether the file is marked for auto-recovery.

Parameters:

ParameterTypeDescription
valueboolean

setBuildVersion(String value)

public void setBuildVersion(String value)

Specifies the incremental public release of the application.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setCheckCompatibility(boolean value)

public void setCheckCompatibility(boolean value)

Indicates whether check compatibility with earlier versions when saving workbook.

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setCheckCustomNumberFormat(boolean value)

public void setCheckCustomNumberFormat(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setCheckExcelRestriction(boolean value)

public void setCheckExcelRestriction(boolean 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.

Parameters:

ParameterTypeDescription
valueboolean

setCompliance(int value)

public void setCompliance(int value)

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

See OoxmlCompliance.

Remarks

Only for .xlsx files.

Parameters:

ParameterTypeDescription
valueint

setCrashSave(boolean value)

public void setCrashSave(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setDataExtractLoad(boolean value)

public void setDataExtractLoad(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setDate1904(boolean value)

public void setDate1904(boolean value)

Sets a value which represents if the workbook uses the 1904 date system.

Parameters:

ParameterTypeDescription
valueboolean

setDefaultEncrypted(boolean value)

public void setDefaultEncrypted(boolean value)

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

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setDefaultImageResolution(int value)

public void setDefaultImageResolution(int value)

Sets default resolution of image.

Parameters:

ParameterTypeDescription
valueint

setDiscardImageEditData(boolean value)

public void setDiscardImageEditData(boolean value)

Indicates whether discarding editting image data.

Parameters:

ParameterTypeDescription
valueboolean

setDisplayDrawingObjects(int value)

public void setDisplayDrawingObjects(int value)

Indicates whether and how to show objects in the workbook.

See DisplayDrawingObjects.

Parameters:

ParameterTypeDescription
valueint

setEnableMacros(boolean value)

public void setEnableMacros(boolean value)

Enable macros;

Remarks

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

Parameters:

ParameterTypeDescription
valueboolean

setFirstVisibleTab(int value)

public void setFirstVisibleTab(int value)

Sets the first visible worksheet tab.

Parameters:

ParameterTypeDescription
valueint

setGlobalizationSettings(GlobalizationSettings value)

public void setGlobalizationSettings(GlobalizationSettings value)

Sets the globalization settings.

Parameters:

ParameterTypeDescription
valueGlobalizationSettings

setHScrollBarVisible(boolean value)

public void setHScrollBarVisible(boolean value)

Sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.

Remarks

The default value is true.

Parameters:

ParameterTypeDescription
valueboolean

setHidden(boolean value)

public void setHidden(boolean value)

Indicates whether this workbook is hidden.

Parameters:

ParameterTypeDescription
valueboolean

setHidePivotFieldList(boolean value)

public void setHidePivotFieldList(boolean value)

Sets whether hide the field list for the PivotTable.

Parameters:

ParameterTypeDescription
valueboolean

setLanguageCode(int value)

public void setLanguageCode(int value)

Sets the user interface language of the Workbook version based on CountryCode that has saved the file.

See CountryCode.

Parameters:

ParameterTypeDescription
valueint

setLocale(Locale value)

public void setLocale(Locale value)

Sets the Locale used by this workbook.

Remarks

Returns null if neither Locale nor getRegion() is set.

Parameters:

ParameterTypeDescription
valuejava.util.Locale

setMaxRowsOfSharedFormula(int value)

public void setMaxRowsOfSharedFormula(int value)

Sets the max row number of shared formula.

Remarks

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

Parameters:

ParameterTypeDescription
valueint

setMemorySetting(int value)

public void setMemorySetting(int value)

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.

See MemorySetting.

Parameters:

ParameterTypeDescription
valueint

setMinimized(boolean value)

public void setMinimized(boolean value)

Represents whether the generated spreadsheet will be opened Minimized.

Parameters:

ParameterTypeDescription
valueboolean

setNumberDecimalSeparator(char value)

public void setNumberDecimalSeparator(char value)

Sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.

Parameters:

ParameterTypeDescription
valuechar

setNumberGroupSeparator(char value)

public void setNumberGroupSeparator(char value)

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.

Parameters:

ParameterTypeDescription
valuechar

setPageOrientationType(int pageOrientationType)

public void setPageOrientationType(int pageOrientationType)

Set the type of print orientation for the whole workbook.

Parameters:

ParameterTypeDescription
pageOrientationTypeintPageOrientationType. The page orientation type

setPaperSize(int value)

public void setPaperSize(int value)

Sets the default print paper size.

See PaperSizeType.

Remarks

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

Parameters:

ParameterTypeDescription
valueint

setPassword(String value)

public void setPassword(String value)

Represents Workbook file encryption password.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPropertiesFollowChartPoint(boolean value)

public void setPropertiesFollowChartPoint(boolean value)

Indicates whether datapoint properties and datalabels in all charts in this workbook follow their reference.

Parameters:

ParameterTypeDescription
valueboolean

setQuotePrefixToStyle(boolean value)

public void setQuotePrefixToStyle(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setRegion(int value)

public void setRegion(int value)

Sets the regional settings for workbook.

See 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.

Parameters:

ParameterTypeDescription
valueint

setRemovePersonalInformation(boolean value)

public void setRemovePersonalInformation(boolean value)

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

Remarks

Parameters:

ParameterTypeDescription
valueboolean

setRepairLoad(boolean value)

public void setRepairLoad(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

setResourceProvider(IStreamProvider value)

public void setResourceProvider(IStreamProvider value)

Sets the stream provider for external resource, such as loading image data for picture of type “LinkToFile”.

Parameters:

ParameterTypeDescription
valueIStreamProvider

setShared(boolean value)

public void setShared(boolean value)

Sets a value that indicates whether the Workbook is shared.

Remarks

The default value is false.

Parameters:

ParameterTypeDescription
valueboolean

setSheetTabBarWidth(int value)

public void setSheetTabBarWidth(int value)

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

Parameters:

ParameterTypeDescription
valueint

setShowTabs(boolean value)

public void setShowTabs(boolean value)

Sets a value whether the Workbook tabs are displayed.

Remarks

The default value is true.

Parameters:

ParameterTypeDescription
valueboolean

setSignificantDigits(int value)

public void setSignificantDigits(int value)

Sets the number of significant digits. The default value is CellsHelper.getSignificantDigits().

Remarks

Only could be 15 or 17 now.

Parameters:

ParameterTypeDescription
valueint

setStreamProvider(IStreamProvider value)

public void setStreamProvider(IStreamProvider value)

Sets the stream provider for external resource.

Remarks

NOTE: This member is now obsolete. Instead, please use ResourceProvider property. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueIStreamProvider

setUpdateAdjacentCellsBorder(boolean value)

public void setUpdateAdjacentCellsBorder(boolean value)

Indicates whether update adjacent cells’ border.

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.

Parameters:

ParameterTypeDescription
valueboolean

setUpdateLinksType(int value)

public void setUpdateLinksType(int value)

Sets how updates external links when the workbook is opened.

See UpdateLinksType.

Parameters:

ParameterTypeDescription
valueint

setVScrollBarVisible(boolean value)

public void setVScrollBarVisible(boolean value)

Sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.

Remarks

The default value is true.

Parameters:

ParameterTypeDescription
valueboolean

setWarningCallback(IWarningCallback value)

public void setWarningCallback(IWarningCallback value)

Sets warning callback.

Parameters:

ParameterTypeDescription
valueIWarningCallback

setWindowHeight(double value)

public void setWindowHeight(double value)

The height of the window, in unit of point.

Parameters:

ParameterTypeDescription
valuedouble

setWindowHeightCM(double value)

public void setWindowHeightCM(double value)

The height of the window, in unit of centimeter.

Parameters:

ParameterTypeDescription
valuedouble

setWindowHeightInch(double value)

public void setWindowHeightInch(double value)

The height of the window, in unit of inch.

Parameters:

ParameterTypeDescription
valuedouble

setWindowLeft(double value)

public void setWindowLeft(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowLeftCM(double value)

public void setWindowLeftCM(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowLeftInch(double value)

public void setWindowLeftInch(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowTop(double value)

public void setWindowTop(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowTopCM(double value)

public void setWindowTopCM(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowTopInch(double value)

public void setWindowTopInch(double value)

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

Parameters:

ParameterTypeDescription
valuedouble

setWindowWidth(double value)

public void setWindowWidth(double value)

The width of the window, in unit of point.

Parameters:

ParameterTypeDescription
valuedouble

setWindowWidthCM(double value)

public void setWindowWidthCM(double value)

The width of the window, in unit of centimeter.

Parameters:

ParameterTypeDescription
valuedouble

setWindowWidthInch(double value)

public void setWindowWidthInch(double value)

The width of the window, in unit of inch.

Parameters:

ParameterTypeDescription
valuedouble

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int