[]
Use this class to configure JSON loading behavior for APIs such as Workbook.fromJson(String,DeserializationOptions) and Workbook.open(String,DeserializationOptions). You can use these options to ignore styles, ignore formulas, or prevent recalculation after the JSON data is loaded.
DeserializationOptions options = new DeserializationOptions();
options.setIgnoreStyle(true);
options.setIgnoreFormula(true);
workbook.fromJson(jsonText, options);
booleanbooleanbooleanvoidsetDoNotRecalculateAfterLoad(boolean value) voidsetIgnoreFormula(boolean value) voidsetIgnoreStyle(boolean value) voidIf this property is true, style information in the JSON data is ignored during deserialization. The default value is false.
DeserializationOptions options = new DeserializationOptions();
options.setIgnoreStyle(true);
boolean ignoreStyle = options.getIgnoreStyle();
true if style information is ignored during JSON deserialization; otherwise, false.If this property is true, style information in the JSON data is ignored during deserialization. The default value is false.
DeserializationOptions options = new DeserializationOptions();
options.setIgnoreStyle(true);
value - true if style information is ignored during JSON deserialization; otherwise, false.If this property is true, formula information in the JSON data is ignored during deserialization. The default value is false.
DeserializationOptions options = new DeserializationOptions();
options.setIgnoreFormula(true);
boolean ignoreFormula = options.getIgnoreFormula();
true if formulas are ignored during JSON deserialization; otherwise, false.If this property is true, formula information in the JSON data is ignored during deserialization. The default value is false.
DeserializationOptions options = new DeserializationOptions();
options.setIgnoreFormula(true);
value - true if formulas are ignored during JSON deserialization; otherwise, false.This option is used by JSON deserialization APIs such as Workbook.fromJson(String,DeserializationOptions) and Workbook.open(String,DeserializationOptions). The default value is false.
When this property is true, formulas are not marked dirty after loading, so the formula results loaded from JSON are returned when calculation is triggered. When this property is false, formulas are marked dirty after loading, so formula results are recalculated when calculation is triggered. Calculation can be triggered by operations such as getting formula values or calling Workbook.calculate().
DeserializationOptions openOptions = new DeserializationOptions();
openOptions.setDoNotRecalculateAfterLoad(true);
boolean doNotRecalculate = openOptions.getDoNotRecalculateAfterLoad();
workbook.open("source.json", openOptions);
true if marking formulas dirty is skipped after loading JSON data; otherwise, false.This option is used by JSON deserialization APIs such as Workbook.fromJson(String,DeserializationOptions) and Workbook.open(String,DeserializationOptions). The default value is false.
When this property is true, formulas are not marked dirty after loading, so the formula results loaded from JSON are returned when calculation is triggered. When this property is false, formulas are marked dirty after loading, so formula results are recalculated when calculation is triggered. Calculation can be triggered by operations such as getting formula values or calling Workbook.calculate().
DeserializationOptions openOptions = new DeserializationOptions();
openOptions.setDoNotRecalculateAfterLoad(true);
workbook.open("source.json", openOptions);
value - true if marking formulas dirty is skipped after loading JSON data; otherwise, false.null.
DeserializationOptions options = new DeserializationOptions();
options.setInvalidFormulaHandling(InvalidFormulaHandling.Preserve);
InvalidFormulaHandling invalidFormulaHandling = options.getInvalidFormulaHandling();
null.
DeserializationOptions options = new DeserializationOptions();
options.setInvalidFormulaHandling(InvalidFormulaHandling.Preserve);
value - How invalid formulas are handled when deserializing JSON data.