[]
Use this class to control which content is included in the generated JSON, such as styles, formulas, sheets, shared formulas, binding sources, and automatically merged cells. These options apply when calling Workbook.toJson(SerializationOptions) or IWorksheet.toJson(SerializationOptions).
SerializationOptions options = new SerializationOptions();
options.setIgnoreStyle(true);
options.setIgnoreFormula(true);
String jsonText = workbook.toJson(options);
booleanbooleanbooleanbooleanbooleanbooleanbooleanfinal booleanvoidsetExportSharedFormula(boolean value) voidsetIgnoreColumnRowInfoOutOfUsedRange(boolean value) voidsetIgnoreFormula(boolean value) voidsetIgnoreRangeOutOfRowColumnCount(boolean value) voidsetIgnoreSheets(boolean value) voidsetIgnoreStyle(boolean value) voidsetIncludeAutoMergedCells(boolean value) final voidsetIncludeBindingSource(boolean value) If this property is true, style information is excluded from the serialized JSON output. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreStyle(true);
boolean ignoreStyle = options.getIgnoreStyle();
true if style information is ignored during JSON serialization; otherwise, false.If this property is true, style information is excluded from the serialized JSON output. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreStyle(true);
value - true if style information is ignored during JSON serialization; otherwise, false.If this property returns true, formula information is excluded from the serialized JSON output. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreFormula(true);
boolean ignoreFormula = options.getIgnoreFormula();
true if formulas are ignored during JSON serialization; otherwise, false.If this property is true, formula information is excluded from the serialized JSON output. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreFormula(true);
value - true if formulas are ignored during JSON serialization; otherwise, false.When this option is true, row styles, column styles, row heights, and column widths outside the used range are not exported. The default value is true.
SerializationOptions options = new SerializationOptions();
options.setIgnoreColumnRowInfoOutOfUsedRange(false);
boolean ignoreUnusedRowsAndColumns = options.getIgnoreColumnRowInfoOutOfUsedRange();
true if row styles, column styles, row heights, and column widths outside the used range are ignored during JSON export; otherwise, false.When this option is true, row styles, column styles, row heights, and column widths outside the used range are not exported. The default value is true.
SerializationOptions options = new SerializationOptions();
options.setIgnoreColumnRowInfoOutOfUsedRange(false);
value - true if row styles, column styles, row heights, and column widths outside the used range are ignored during JSON export; otherwise, false.If this property is true, the JSON output excludes worksheet data. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreSheets(true);
boolean ignoreSheets = options.getIgnoreSheets();
true if sheets are ignored during JSON serialization; otherwise, false.If this property is true, the JSON output excludes worksheet data. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreSheets(true);
value - true if sheets are ignored during JSON serialization; otherwise, false.If this property is true, data outside the row and column count limits is ignored during JSON export. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreRangeOutOfRowColumnCount(true);
boolean ignoreRangeOutOfBounds = options.getIgnoreRangeOutOfRowColumnCount();
true if data outside the RowCount and ColumnCount is ignored during JSON export; otherwise, false.If this property is true, data outside the row and column count limits is ignored during JSON export. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIgnoreRangeOutOfRowColumnCount(true);
value - true if data outside the RowCount and ColumnCount is ignored during JSON export; otherwise, false.If this property is true, bound data sources are included in the serialized JSON output. If this property is false, binding source information is not included. The default value is true.
SerializationOptions options = new SerializationOptions();
options.setIncludeBindingSource(false);
boolean includeBindingSource = options.getIncludeBindingSource();
true if binding sources are included during JSON serialization; otherwise, false.If this property is true, bound data sources are included in the serialized JSON output. If this property is false, binding source information is not included. The default value is true.
SerializationOptions options = new SerializationOptions();
options.setIncludeBindingSource(false);
value - true if binding sources are included during JSON serialization; otherwise, false.When this property is true, auto-merge information added to a worksheet can take effect when the workbook or worksheet is serialized to JSON. The default value is false.
SerializationOptions options = new SerializationOptions();
options.setIncludeAutoMergedCells(true);
boolean includeAutoMergedCells = options.getIncludeAutoMergedCells();
true if automatically merged cells are included during JSON serialization; otherwise, false.
SerializationOptions options = new SerializationOptions();
options.setIncludeAutoMergedCells(true);
value - true if automatically merged cells are included during JSON serialization; otherwise, false.