jxl
Class WorkbookSettings

java.lang.Object
  extended byjxl.WorkbookSettings

public final class WorkbookSettings
extends java.lang.Object

This is a bean which client applications may use to set various advanced workbook properties. Use of this bean is not mandatory, and its absence will merely result in workbooks being read/written using the default settings


Constructor Summary
WorkbookSettings()
          Default constructor
 
Method Summary
 int getArrayGrowSize()
          Accessor for the array grow size property
 int getCharacterSet()
          Accessor for the character set.
 boolean getDrawingsDisabled()
          Gets the drawings disabled flag
 java.lang.String getEncoding()
          Accessor for the character encoding
 java.lang.String getExcelDisplayLanguage()
          Returns the two character ISO 3166 mnemonic used by excel for user language displayto display
 java.lang.String getExcelRegionalSettings()
          Returns the two character ISO 3166 mnemonic used by excel for its regional settings
 boolean getFormulaAdjust()
          Accessor for the formula adjust disabled
 jxl.biff.formula.FunctionNames getFunctionNames()
          Gets the function names.
 boolean getGCDisabled()
          Accessor for the disabling of garbage collection
 boolean getIgnoreBlanks()
          Accessor for the ignore blanks flag
 int getInitialFileSize()
          Accessor for the initial file size property
 java.util.Locale getLocale()
          Returns the locale used by JExcelAPI to read the spreadsheet
 boolean getNamesDisabled()
          Accessor for the disabling of interpretation of named ranges
 boolean getPropertySetsDisabled()
          Accessor to retrieve the property sets disabled flag
 boolean getRationalizationDisabled()
          Accessor to retrieve the rationalization flag
 void setArrayGrowSize(int sz)
          Sets the amount of memory by which to increase the amount of memory allocated to storing the workbook data.
 void setCharacterSet(int cs)
          Sets the character set.
 void setDrawingsDisabled(boolean b)
          Disables the handling of drawings
 void setEncoding(java.lang.String enc)
          Sets the encoding for this workbook
 void setExcelDisplayLanguage(java.lang.String code)
          Sets the language in which the generated file will display
 void setExcelRegionalSettings(java.lang.String code)
          Sets the regional settings for the generated excel file
 void setFormulaAdjust(boolean b)
          Setter for the formula adjust disabled property
 void setGCDisabled(boolean disabled)
          Sets the garbage collection disabled
 void setIgnoreBlanks(boolean ignoreBlanks)
          Sets the ignore blanks flag
 void setInitialFileSize(int sz)
          Sets the initial amount of memory allocated to store the workbook data when reading a worksheet.
 void setLocale(java.util.Locale l)
          Sets the locale used by JExcelApi to generate the spreadsheet.
 void setNamesDisabled(boolean b)
          Disables the handling of names
 void setPropertySets(boolean r)
          Sets whether or not to enable any property sets (such as macros) to be copied along with the workbook Leaving this feature enabled will result in the JXL process using more memory
 void setRationalization(boolean r)
          Sets whether or not to rationalize the cell formats before writing out the sheet.
 void setSuppressWarnings(boolean w)
          Accessor to set the suppress warnings flag.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkbookSettings

public WorkbookSettings()
Default constructor

Method Detail

getArrayGrowSize

public int getArrayGrowSize()
Accessor for the array grow size property

Returns:
the array grow size

getCharacterSet

public int getCharacterSet()
Accessor for the character set. This value is only used for reading and has no effect when writing out the spreadsheet

Returns:
the character set used by this spreadsheet

getDrawingsDisabled

public boolean getDrawingsDisabled()
Gets the drawings disabled flag

Returns:
TRUE if drawings are disabled, FALSE otherwise

getEncoding

public java.lang.String getEncoding()
Accessor for the character encoding

Returns:
the character encoding for this workbook

getExcelDisplayLanguage

public java.lang.String getExcelDisplayLanguage()
Returns the two character ISO 3166 mnemonic used by excel for user language displayto display


getExcelRegionalSettings

public java.lang.String getExcelRegionalSettings()
Returns the two character ISO 3166 mnemonic used by excel for its regional settings


getFormulaAdjust

public boolean getFormulaAdjust()
Accessor for the formula adjust disabled

Returns:
TRUE if formulas are adjusted following row/column inserts/deletes FALSE otherwise

getFunctionNames

public jxl.biff.formula.FunctionNames getFunctionNames()
Gets the function names. This is used by the formula parsing package in order to get the locale specific function names for this particular workbook

Returns:
the list of function names

getGCDisabled

public boolean getGCDisabled()
Accessor for the disabling of garbage collection

Returns:
FALSE if JExcelApi hints for garbage collection, TRUE otherwise

getIgnoreBlanks

public boolean getIgnoreBlanks()
Accessor for the ignore blanks flag

Returns:
TRUE if blank cells are being ignored, FALSE otherwise

getInitialFileSize

public int getInitialFileSize()
Accessor for the initial file size property

Returns:
the initial file size

getLocale

public java.util.Locale getLocale()
Returns the locale used by JExcelAPI to read the spreadsheet

Returns:
the locale

getNamesDisabled

public boolean getNamesDisabled()
Accessor for the disabling of interpretation of named ranges

Returns:
FALSE if named cells are interpreted, TRUE otherwise

getPropertySetsDisabled

public boolean getPropertySetsDisabled()
Accessor to retrieve the property sets disabled flag

Returns:
TRUE if property sets are disabled, FALSE otherwise

getRationalizationDisabled

public boolean getRationalizationDisabled()
Accessor to retrieve the rationalization flag

Returns:
TRUE if rationalization is off, FALSE if rationalization is on

setArrayGrowSize

public void setArrayGrowSize(int sz)
Sets the amount of memory by which to increase the amount of memory allocated to storing the workbook data. For processeses reading many small workbooks inside a WAS it might be necessary to reduce the default size Default value is 1 megabyte

Parameters:
sz - the file size in bytes

setCharacterSet

public void setCharacterSet(int cs)
Sets the character set. This is only used when the spreadsheet is read, and has no effect when the spreadsheet is written

Parameters:
cs - the character set encoding value

setDrawingsDisabled

public void setDrawingsDisabled(boolean b)
Disables the handling of drawings

Parameters:
b - TRUE to disable the names feature, FALSE otherwise

setEncoding

public void setEncoding(java.lang.String enc)
Sets the encoding for this workbook

Parameters:
enc - the encoding

setExcelDisplayLanguage

public void setExcelDisplayLanguage(java.lang.String code)
Sets the language in which the generated file will display

Parameters:
code - the two character ISO 3166 country code

setExcelRegionalSettings

public void setExcelRegionalSettings(java.lang.String code)
Sets the regional settings for the generated excel file

Parameters:
code - the two character ISO 3166 country code

setFormulaAdjust

public void setFormulaAdjust(boolean b)
Setter for the formula adjust disabled property

Parameters:
b - TRUE to adjust formulas, FALSE otherwise

setGCDisabled

public void setGCDisabled(boolean disabled)
Sets the garbage collection disabled

Parameters:
disabled -

setIgnoreBlanks

public void setIgnoreBlanks(boolean ignoreBlanks)
Sets the ignore blanks flag

Parameters:
ignoreBlanks -

setInitialFileSize

public void setInitialFileSize(int sz)
Sets the initial amount of memory allocated to store the workbook data when reading a worksheet. For processeses reading many small workbooks inside a WAS it might be necessary to reduce the default size Default value is 5 megabytes

Parameters:
sz - the file size in bytes

setLocale

public void setLocale(java.util.Locale l)
Sets the locale used by JExcelApi to generate the spreadsheet. Setting this value has no effect on the language or region of the generated excel file

Parameters:
l - the locale

setNamesDisabled

public void setNamesDisabled(boolean b)
Disables the handling of names

Parameters:
b - TRUE to disable the names feature, FALSE otherwise

setPropertySets

public void setPropertySets(boolean r)
Sets whether or not to enable any property sets (such as macros) to be copied along with the workbook Leaving this feature enabled will result in the JXL process using more memory

Parameters:
r - the property sets flag

setRationalization

public void setRationalization(boolean r)
Sets whether or not to rationalize the cell formats before writing out the sheet. The default value is true

Parameters:
r - the rationalization flag

setSuppressWarnings

public void setSuppressWarnings(boolean w)
Accessor to set the suppress warnings flag. Due to the change in logging in version 2.4, this will now set the warning behaviour across the JVM (depending on the type of logger used)

Parameters:
w - the flag