[]
        
(Showing Draft Content)

IExcelOptions

Interface IExcelOptions


public interface IExcelOptions
Represents options for processing Excel workbooks.

This interface provides access to workbook-level settings that control Excel behavior, such as formula-related options and data-related options.


 IWorkbook workbook = new Workbook();
 IWorksheet worksheet = workbook.getWorksheets().get(0);
 IExcelOptions options = workbook.getOptions();
 options.getFormulas().setEnableIterativeCalculation(true);
 options.getFormulas().setMaximumIterations(3);
 options.getData().setAutomaticGroupDateTimeInPivotTable(false);
 worksheet.getRange("A1").setValue(1000);
 worksheet.getRange("A2").setFormula("(A1+A2)/10");
 workbook.calculate();
 Object iterativeResult = worksheet.getRange("A2").getValue();
 boolean automaticGrouping = options.getData().getAutomaticGroupDateTimeInPivotTable();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets options related to Excel data processing.
    Gets the formula-related options.
  • Method Details

    • getFormulas

      IFormulaOptions getFormulas()
      Gets the formula-related options.

      Returns an IFormulaOptions instance that provides access to settings for formula calculation, calculation performance, and error handling.

      
       IExcelOptions options = workbook.getOptions();
       IFormulaOptions formulaOptions = options.getFormulas();
       formulaOptions.setEnableIterativeCalculation(true);
       formulaOptions.setMaximumIterations(20);
       
      Returns:
      The IFormulaOptions instance for configuring formula-related options.
    • getData

      IDataOptions getData()
      Gets options related to Excel data processing.

      Returns an IDataOptions object that provides settings for data import and data analysis.

      
       IDataOptions dataOptions = workbook.getOptions().getData();
       dataOptions.setBigDecimalAsDouble(true);
       dataOptions.setAutomaticGroupDateTimeInPivotTable(false);
       
      Returns:
      An IDataOptions object that contains options related to data import and data analysis.