com.aspose.cells
Class WorkbookSettings

java.lang.Object
    extended by com.aspose.cells.WorkbookSettings

public class WorkbookSettings 
extends java.lang.Object

Represents all seetings of the workbook.

Property Getters/Setters Summary
booleangetAutoCompressPictures()
voidsetAutoCompressPictures(boolean value)
           Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.
java.lang.StringgetBuildVersion()
voidsetBuildVersion(java.lang.String value)
           Specifies the incremental public release of the application.
intgetCalcMode()
voidsetCalcMode(int value)
           It specifies whether to calculate formulas manually, automatically or automatically except for multiple table operations. The value of the property is CalcModeType integer constant.
intgetCalcStackSize()
voidsetCalcStackSize(int value)
           Specifies the stack size for calculating cells recursively. The large value for this size will give better performance when there are lots of cells need to be calculated recursively. On the other hand, larger value will raise the stakes of StackOverflowException. If use gets StackOverflowException when calculating formulas, this value should be decreased.
java.lang.StringgetCalculationId()
voidsetCalculationId(java.lang.String value)
           Specifies the version of the calculation engine used to calculate values in the workbook.
booleangetCheckComptiliblity()
voidsetCheckComptiliblity(boolean value)
           Indicates whether check comptiliblity when saving workbook.
booleangetCheckExcelRestriction()
voidsetCheckExcelRestriction(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.
booleangetConvertNumericData()
voidsetConvertNumericData(boolean value)
           Gets or sets a value that indicates whether the string in text file is converted to numeric data.
booleangetCreateCalcChain()
voidsetCreateCalcChain(boolean value)
           Indicates whether create calculated formulas chain.
booleangetDate1904()
voidsetDate1904(boolean value)
           Gets or sets a value which represents if the workbook uses the 1904 date system.
intgetDisplayDrawingObjects()
voidsetDisplayDrawingObjects(int value)
           Indicates whether and how to show objects in the workbook. The value of the property is DisplayDrawingObjects integer constant.
com.aspose.cells.EncodinggetEncoding()
voidsetEncoding(com.aspose.cells.Encoding value)
           Gets and sets the default encoding.Only applies for csv file.
intgetFirstVisibleTab()
voidsetFirstVisibleTab(int value)
           Gets or sets the first visible worksheet tab.
booleanisHidden()
voidsetHidden(boolean value)
           Indicates whether this workbook is hidden.
booleanisHScrollBarVisible()
voidsetHScrollBarVisible(boolean value)
           Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar.
booleanisMinimized()
voidsetMinimized(boolean value)
           Represents whether the generated spreadsheet will be opened Minimized.
booleanisProtected()
           Gets a value that indicates whether the Workbook is protected.
booleanisVScrollBarVisible()
voidsetVScrollBarVisible(boolean value)
           Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar.
booleanisWriteProtected()
voidsetWriteProtected(boolean value)
           Indicates whether this workbook is write protected.
booleangetIteration()
voidsetIteration(boolean value)
           Indicates if Aspose.Cells will use iteration to resolve circular references.
intgetLanguage()
voidsetLanguage(int value)
           Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value of the property is CountryCode integer constant.
intgetLanguageCode()
voidsetLanguageCode(int value)
           Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value of the property is CountryCode integer constant.
java.util.LocalegetLocale()
voidsetLocale(java.util.Locale value)
           Gets or sets the Locale used by this workbook.
doublegetMaxChange()
voidsetMaxChange(double value)
           Returns or sets the maximum number of change that Microsoft Excel can use to resolve a circular reference.
intgetMaxIteration()
voidsetMaxIteration(int value)
           Returns or sets the maximum number of iterations that Aspose.Cells can use to resolve a circular reference.
booleangetParsingFormulaOnOpen()
voidsetParsingFormulaOnOpen(boolean value)
           Indicates whether parsing the formula when reading the file.
java.lang.StringgetPassword()
voidsetPassword(java.lang.String value)
           Represents Workbook file encryption password.
booleangetPrecisionAsDisplayed()
voidsetPrecisionAsDisplayed(boolean value)
           True if calculations in this workbook will be done using only the precision of the numbers as they're displayed
intgetProtectionType()
           Gets the protection type of the workbook. The value of the property is ProtectionType integer constant.
booleangetReCalcOnOpen()
voidsetReCalcOnOpen(boolean value)
           Indicates whether re-calculate all formulas on opening file.
booleangetRecalculateBeforeSave()
voidsetRecalculateBeforeSave(boolean value)
           Indicates whether to recalculate before saving the document.
booleangetReCalculateOnOpen()
voidsetReCalculateOnOpen(boolean value)
           Indicates whether re-calculate all formulas on opening file.
booleangetRecommendReadOnly()
voidsetRecommendReadOnly(boolean value)
           Indicates if the Read Only Recommended option is selected.
intgetRegion()
voidsetRegion(int value)
           Gets or sets the system regional settings based on CountryCode at the time the file was saved. The value of the property is CountryCode integer constant.
booleangetShared()
voidsetShared(boolean value)
           Gets or sets a value that indicates whether the Workbook is shared.
intgetSheetTabBarWidth()
voidsetSheetTabBarWidth(int value)
           Width of worksheet tab bar (in 1/1000 of window width).
booleangetShowTabs()
voidsetShowTabs(boolean value)
           Get or sets a value whether the Workbook tabs are displayed.
booleangetUpdateAdjacentCellsBorder()
voidsetUpdateAdjacentCellsBorder(boolean value)
           Indicates whether update adjacent cells' border.
doublegetWindowHeight()
voidsetWindowHeight(double value)
           The height of the window, in unit of point.
doublegetWindowHeightCM()
voidsetWindowHeightCM(double value)
           The height of the window,in unit of centimeter.
doublegetWindowHeightInch()
voidsetWindowHeightInch(double value)
           The height of the window,in unit of inch.
doublegetWindowLeft()
voidsetWindowLeft(double value)
           The distance from the left edge of the client area to the left edge of the window, in unit of point.
doublegetWindowLeftCM()
voidsetWindowLeftCM(double value)
           The distance from the left edge of the client area to the left edge of the window. In unit of centimeter.
doublegetWindowLeftInch()
voidsetWindowLeftInch(double value)
           The distance from the left edge of the client area to the left edge of the window. In unit of inch.
doublegetWindowTop()
voidsetWindowTop(double value)
           The distance from the top edge of the client area to the top edge of the window, in unit of point.
doublegetWindowTopCM()
voidsetWindowTopCM(double value)
           The distance from the top edge of the client area to the top edge of the window,in unit of centimeter.
doublegetWindowTopInch()
voidsetWindowTopInch(double value)
           The distance from the top edge of the client area to the top edge of the window,in unit of inch.
doublegetWindowWidth()
voidsetWindowWidth(double value)
           The width of the window, in unit of point.
doublegetWindowWidthCM()
voidsetWindowWidthCM(double value)
           The width of the window,in unit of centimeter.
doublegetWindowWidthInch()
voidsetWindowWidthInch(double value)
           The width of the window,in unit of inch.
voidsetWriteProtectedPassword(java.lang.String value)
           Sets the proected password to modify the file.
 

Property Getters/Setters Detail

getDate1904/setDate1904

public boolean getDate1904() / public void setDate1904(boolean value)
Gets or sets a value which represents if the workbook uses the 1904 date system.

getProtectionType

public int getProtectionType()
Gets the protection type of the workbook. The value of the property is ProtectionType integer constant.

getPrecisionAsDisplayed/setPrecisionAsDisplayed

public boolean getPrecisionAsDisplayed() / public void setPrecisionAsDisplayed(boolean value)
True if calculations in this workbook will be done using only the precision of the numbers as they're displayed

getReCalculateOnOpen/setReCalculateOnOpen

public boolean getReCalculateOnOpen() / public void setReCalculateOnOpen(boolean value)
Indicates whether re-calculate all formulas on opening file.

getCreateCalcChain/setCreateCalcChain

public boolean getCreateCalcChain() / public void setCreateCalcChain(boolean value)
Indicates whether create calculated formulas chain.

getReCalcOnOpen/setReCalcOnOpen

public boolean getReCalcOnOpen() / public void setReCalcOnOpen(boolean value)
Indicates whether re-calculate all formulas on opening file. NOTE: This member is now obsolete. Instead, please use WorkbookSettings.ReCalculateOnOpen property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced.

getDisplayDrawingObjects/setDisplayDrawingObjects

public int getDisplayDrawingObjects() / public void setDisplayDrawingObjects(int value)
Indicates whether and how to show objects in the workbook. The value of the property is DisplayDrawingObjects integer constant.

getIteration/setIteration

public boolean getIteration() / public void setIteration(boolean value)
Indicates if Aspose.Cells will use iteration to resolve circular references.

getMaxIteration/setMaxIteration

public int getMaxIteration() / public void setMaxIteration(int value)
Returns or sets the maximum number of iterations that Aspose.Cells can use to resolve a circular reference.

getMaxChange/setMaxChange

public double getMaxChange() / public void setMaxChange(double value)
Returns or sets the maximum number of change that Microsoft Excel can use to resolve a circular reference.

getCalcMode/setCalcMode

public int getCalcMode() / public void setCalcMode(int value)
It specifies whether to calculate formulas manually, automatically or automatically except for multiple table operations. The value of the property is CalcModeType integer constant.

getCalculationId/setCalculationId

public java.lang.String getCalculationId() / public void setCalculationId(java.lang.String value)
Specifies the version of the calculation engine used to calculate values in the workbook.

getCalcStackSize/setCalcStackSize

public int getCalcStackSize() / public void setCalcStackSize(int value)
Specifies the stack size for calculating cells recursively. The large value for this size will give better performance when there are lots of cells need to be calculated recursively. On the other hand, larger value will raise the stakes of StackOverflowException. If use gets StackOverflowException when calculating formulas, this value should be decreased.

getRecalculateBeforeSave/setRecalculateBeforeSave

public boolean getRecalculateBeforeSave() / public void setRecalculateBeforeSave(boolean value)
Indicates whether to recalculate before saving the document.

getSheetTabBarWidth/setSheetTabBarWidth

public int getSheetTabBarWidth() / public void setSheetTabBarWidth(int value)
Width of worksheet tab bar (in 1/1000 of window width).

getShowTabs/setShowTabs

public boolean getShowTabs() / public void setShowTabs(boolean value)
Get or sets a value whether the Workbook tabs are displayed. 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);

getFirstVisibleTab/setFirstVisibleTab

public int getFirstVisibleTab() / public void setFirstVisibleTab(int value)
Gets or sets the first visible worksheet tab.

isHScrollBarVisible/setHScrollBarVisible

public boolean isHScrollBarVisible() / public void setHScrollBarVisible(boolean value)
Gets or sets a value indicating whether the generated spreadsheet will contain a horizontal scroll bar. 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.
workbook.getSettings().setHScrollBarVisible(false);

isVScrollBarVisible/setVScrollBarVisible

public boolean isVScrollBarVisible() / public void setVScrollBarVisible(boolean value)
Gets or sets a value indicating whether the generated spreadsheet will contain a vertical scroll bar. 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.
workbook.getSettings().setVScrollBarVisible(false);

getShared/setShared

public boolean getShared() / public void setShared(boolean value)
Gets or sets a value that indicates whether the Workbook is shared. The default value is false.

getLanguage/setLanguage

public int getLanguage() / public void setLanguage(int value)
Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value of the property is CountryCode integer constant.NOTE: This member is now obsolete. Instead, please use WorkbookSettings.LanguageCode property. This property will be removed 12 months later since June 2010. Aspose apologizes for any inconvenience you may have experienced.

getLanguageCode/setLanguageCode

public int getLanguageCode() / public void setLanguageCode(int value)
Gets or sets the user interface language of the Workbook version based on CountryCode that has saved the file. The value of the property is CountryCode integer constant.

getRegion/setRegion

public int getRegion() / public void setRegion(int value)
Gets or sets the system regional settings based on CountryCode at the time the file was saved. The value of the property is CountryCode integer constant.If you do not want to use the region saved in the file, please reset it after reading the file.

getLocale/setLocale

public java.util.Locale getLocale() / public void setLocale(java.util.Locale value)
Gets or sets the Locale used by this workbook. Returns null if neither Locale nor Region is set.

getEncoding/setEncoding

public com.aspose.cells.Encoding getEncoding() / public void setEncoding(com.aspose.cells.Encoding value)
Gets and sets the default encoding.Only applies for csv file.

getPassword/setPassword

public java.lang.String getPassword() / public void setPassword(java.lang.String value)
Represents Workbook file encryption password.

getConvertNumericData/setConvertNumericData

public boolean getConvertNumericData() / public void setConvertNumericData(boolean value)
Gets or sets a value that indicates whether the string in text file is converted to numeric data. NOTE: This member is now obsolete. Instead, please use TxtLoadOptions.ConvertNumericData property. This property will be removed 12 months later since December 2011. Aspose apologizes for any inconvenience you may have experienced.

getRecommendReadOnly/setRecommendReadOnly

public boolean getRecommendReadOnly() / public void setRecommendReadOnly(boolean value)
Indicates if the Read Only Recommended option is selected.

isWriteProtected/setWriteProtected

public boolean isWriteProtected() / public void setWriteProtected(boolean value)
Indicates whether this workbook is write protected.

setWriteProtectedPassword

public void setWriteProtectedPassword(java.lang.String value)
Sets the proected password to modify the file.

isProtected

public boolean isProtected()
Gets a value that indicates whether the Workbook is protected.

isMinimized/setMinimized

public boolean isMinimized() / public void setMinimized(boolean value)
Represents whether the generated spreadsheet will be opened Minimized.

isHidden/setHidden

public boolean isHidden() / public void setHidden(boolean value)
Indicates whether this workbook is hidden.

getAutoCompressPictures/setAutoCompressPictures

public boolean getAutoCompressPictures() / public void setAutoCompressPictures(boolean value)
Specifies a boolean value that indicates the application automatically compressed pictures in the workbook.

getParsingFormulaOnOpen/setParsingFormulaOnOpen

public boolean getParsingFormulaOnOpen() / public void setParsingFormulaOnOpen(boolean value)
Indicates whether parsing the formula when reading the file. Only applies for Excel Xlsx,Xltx, Xltm,Xlsm file because the formulas in the files are stored with a string formula.

getWindowLeft/setWindowLeft

public double getWindowLeft() / 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.

getWindowLeftInch/setWindowLeftInch

public double getWindowLeftInch() / 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.

getWindowLeftCM/setWindowLeftCM

public double getWindowLeftCM() / 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.

getWindowTop/setWindowTop

public double getWindowTop() / 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.

getWindowTopInch/setWindowTopInch

public double getWindowTopInch() / 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.

getWindowTopCM/setWindowTopCM

public double getWindowTopCM() / 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.

getWindowWidth/setWindowWidth

public double getWindowWidth() / public void setWindowWidth(double value)
The width of the window, in unit of point.

getWindowWidthInch/setWindowWidthInch

public double getWindowWidthInch() / public void setWindowWidthInch(double value)
The width of the window,in unit of inch.

getWindowWidthCM/setWindowWidthCM

public double getWindowWidthCM() / public void setWindowWidthCM(double value)
The width of the window,in unit of centimeter.

getWindowHeight/setWindowHeight

public double getWindowHeight() / public void setWindowHeight(double value)
The height of the window, in unit of point.

getWindowHeightInch/setWindowHeightInch

public double getWindowHeightInch() / public void setWindowHeightInch(double value)
The height of the window,in unit of inch.

getWindowHeightCM/setWindowHeightCM

public double getWindowHeightCM() / public void setWindowHeightCM(double value)
The height of the window,in unit of centimeter.

getUpdateAdjacentCellsBorder/setUpdateAdjacentCellsBorder

public boolean getUpdateAdjacentCellsBorder() / public void setUpdateAdjacentCellsBorder(boolean value)
Indicates whether update adjacent cells' border. The default value is true. For example: the bottom border of the cell A1 is update, the top border of the cell A2 should be changed too.

getCheckComptiliblity/setCheckComptiliblity

public boolean getCheckComptiliblity() / public void setCheckComptiliblity(boolean value)
Indicates whether check comptiliblity when saving workbook. The default value is true.

getCheckExcelRestriction/setCheckExcelRestriction

public boolean getCheckExcelRestriction() / 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.

getBuildVersion/setBuildVersion

public java.lang.String getBuildVersion() / public void setBuildVersion(java.lang.String value)
Specifies the incremental public release of the application.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.