⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 workbooksettings.java

📁 java操作Excel表格的api
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    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 TRUE to disable garbage collection, FALSE to enable it
   */
  public void setGCDisabled(boolean disabled)
  {
    gcDisabled = disabled;
  }

  /**
   * Sets the ignore blanks flag
   *
   * @param ignoreBlanks TRUE to ignore blanks, FALSE to take them into account
   */
  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;
  }

  /**
   * Sets the ignore cell validation flag
   *
   * @param cv TRUE to disable cell validation, FALSE to enable it
   */
  public void setCellValidationDisabled(boolean cv)
  {
    cellValidationDisabled = cv;
  }

  /**
   * Accessor for the ignore cell validation
   *
   * @return TRUE if cell validation is disabled
   */
  public boolean getCellValidationDisabled()
  {
    return cellValidationDisabled;
  }

  /**
   * Returns the two character ISO 3166 mnemonic used by excel for user
   * language displayto display
   * @return the display language
   */
  public String getExcelDisplayLanguage()
  {
    return excelDisplayLanguage;
  }

  /**
   * Returns the two character ISO 3166 mnemonic used by excel for
   * its regional settings
   * @return the 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;
  }

  /**
   * Accessor for the autofilter disabled feature
   *
   * @return TRUE if autofilter is disabled, FALSE otherwise
   */
  public boolean getAutoFilterDisabled()
  {
    return autoFilterDisabled;
  }

  /**
   * Sets the autofilter disabled 
   *
   * @param disabled 
   */
  public void setAutoFilterDisabled(boolean disabled)
  {
    autoFilterDisabled = disabled;
  }

  /**
   * Accessor for the temporary file during write.  If this is set, then
   * when the workbook is written a temporary file will be used to store
   * the interim binary data, otherwise it will take place in memory.  Setting
   * this flag involves an assessment of the trade-offs between memory usage
   * and performance
   *
   * @return TRUE if a temporary is file is used during writing, 
   * FALSE otherwise
   */
  public boolean getUseTemporaryFileDuringWrite()
  {
    return useTemporaryFileDuringWrite;
  }

  /**
   * Sets whether a temporary file is used during the generation of
   * the workbook.  If not set, the workbook will take place entirely in
   * memory.   Setting
   * this flag involves an assessment of the trade-offs between memory usage
   * and performance
   *
   * @return TRUE if a temporary is file is used during writing, 
   * FALSE otherwise
   */
  public void setUseTemporaryFileDuringWrite(boolean temp)
  {
    useTemporaryFileDuringWrite = temp;
  }

  /**
   * Used in conjunction with the UseTemporaryFileDuringWrite setting to
   * set the target directory for the temporary files.   If this is not set,
   * the system default temporary directory is used.
   * This has no effect unless the useTemporaryFileDuringWrite setting
   * is TRUE
   *
   * @param dir the directory to which temporary files should be written
   */
  public void setTemporaryFileDuringWriteDirectory(File dir)
  {
    temporaryFileDuringWriteDirectory = dir;
  }

  /**
   * Used in conjunction with the UseTemporaryFileDuringWrite setting to
   * set the target directory for the temporary files.  This value can 
   * be NULL, in which case the normal system default temporary directory
   * is used instead
   *
   * @return the temporary directory used during write, or NULL if it is 
   *         not set
   */
  public File getTemporaryFileDuringWriteDirectory()
  {
    return temporaryFileDuringWriteDirectory;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -