📄 workbooksettings.java
字号:
public boolean getGCDisabled()
{
return gcDisabled;
}
/**
* Accessor for the disabling of interpretation of named ranges
*
* @return FALSE if named cells are interpreted, TRUE otherwise
*/
public boolean getNamesDisabled()
{
return namesDisabled;
}
/**
* Disables the handling of names
*
* @param b TRUE to disable the names feature, FALSE otherwise
*/
public void setNamesDisabled(boolean b)
{
namesDisabled = b;
}
/**
* Disables the handling of drawings
*
* @param b TRUE to disable the names feature, FALSE otherwise
*/
public void setDrawingsDisabled(boolean b)
{
drawingsDisabled = b;
}
/**
* Sets whether or not to rationalize the cell formats before
* writing out the sheet. The default value is true
*
* @param r the rationalization flag
*/
public void setRationalization(boolean r)
{
rationalizationDisabled = !r;
}
/**
* Accessor to retrieve the rationalization flag
*
* @return TRUE if rationalization is off, FALSE if rationalization is on
*/
public boolean getRationalizationDisabled()
{
return rationalizationDisabled;
}
/**
* Accessor to retrieve the merged cell checking flag
*
* @return TRUE if merged cell checking is off, FALSE if it is on
*/
public boolean getMergedCellCheckingDisabled()
{
return mergedCellCheckingDisabled;
}
/**
* Accessor to set the merged cell checking
*
* @param b - TRUE to enable merged cell checking, FALSE otherwise
*/
public void setMergedCellChecking(boolean b)
{
mergedCellCheckingDisabled = !b;
}
/**
* 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
*
* @param r the property sets flag
*/
public void setPropertySets(boolean r)
{
propertySetsDisabled = !r;
}
/**
* Accessor to retrieve the property sets disabled flag
*
* @return TRUE if property sets are disabled, FALSE otherwise
*/
public boolean getPropertySetsDisabled()
{
return propertySetsDisabled;
}
/**
* 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)
*
* @param w the flag
*/
public void setSuppressWarnings(boolean w)
{
logger.setSuppressWarnings(w);
}
/**
* Accessor for the formula adjust disabled
*
* @return TRUE if formulas are adjusted following row/column inserts/deletes
* FALSE otherwise
*/
public boolean getFormulaAdjust()
{
return !formulaReferenceAdjustDisabled;
}
/**
* Setter for the formula adjust disabled property
*
* @param b TRUE to adjust formulas, FALSE otherwise
*/
public void setFormulaAdjust(boolean b)
{
formulaReferenceAdjustDisabled = !b;
}
/**
* 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
*
* @param l the locale
*/
public void setLocale(Locale l)
{
locale = l;
}
/**
* Returns the locale used by JExcelAPI to read the spreadsheet
*
* @return the locale
*/
public Locale getLocale()
{
return locale;
}
/**
* Accessor for the character encoding
*
* @return the character encoding for this workbook
*/
public String getEncoding()
{
return encoding;
}
/**
* Sets the encoding for this workbook
*
* @param enc the encoding
*/
public void setEncoding(String enc)
{
encoding = enc;
}
/**
* 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
*
* @return the list of function names
*/
public FunctionNames getFunctionNames()
{
if (functionNames == null)
{
functionNames = (FunctionNames) localeFunctionNames.get(locale);
// have not previously accessed function names for this locale,
// so create a brand new one and add it to the list
if (functionNames == null)
{
functionNames = new FunctionNames(locale);
localeFunctionNames.put(locale, functionNames);
}
}
return functionNames;
}
/**
* Accessor for the character set. This value is only used for reading
* and has no effect when writing out the spreadsheet
*
* @return the character set used by this spreadsheet
*/
public int getCharacterSet()
{
return characterSet;
}
/**
* Sets the character set. This is only used when the spreadsheet is
* read, and has no effect when the spreadsheet is written
*
* @param cs the character set encoding value
*/
public void setCharacterSet(int cs)
{
characterSet = cs;
}
/**
* Sets the garbage collection disabled
*
* @param disabled
*/
public void setGCDisabled(boolean disabled)
{
gcDisabled = disabled;
}
/**
* Sets the ignore blanks flag
*
* @param ignoreBlanks
*/
public void setIgnoreBlanks(boolean ignoreBlanks)
{
ignoreBlankCells = ignoreBlanks;
}
/**
* Accessor for the ignore blanks flag
*
* @return TRUE if blank cells are being ignored, FALSE otherwise
*/
public boolean getIgnoreBlanks()
{
return ignoreBlankCells;
}
/**
* Returns the two character ISO 3166 mnemonic used by excel for user
* language displayto display
*/
public String getExcelDisplayLanguage()
{
return excelDisplayLanguage;
}
/**
* Returns the two character ISO 3166 mnemonic used by excel for
* its regional settings
*/
public String getExcelRegionalSettings()
{
return excelRegionalSettings;
}
/**
* Sets the language in which the generated file will display
*
* @param code the two character ISO 3166 country code
*/
public void setExcelDisplayLanguage(String code)
{
excelDisplayLanguage = code;
}
/**
* Sets the regional settings for the generated excel file
*
* @param code the two character ISO 3166 country code
*/
public void setExcelRegionalSettings(String code)
{
excelRegionalSettings = code;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -