DeleteBlankOptions
DeleteBlankOptions class
Represents the setting of deleting blank cells/rows/columns.
class DeleteBlankOptions extends DeleteOptions;
Constructors
Name | Description |
---|---|
constructor(DeleteOptions) | Constructs from a parent object convertible to this. |
constructor() | Default Constructor. |
Properties
Property | Type | Description |
---|---|---|
emptyStringAsBlank | boolean | Whether one cell will be taken as blank when its value is empty string. Default value is true. |
emptyFormulaValueAsBlank | boolean | Whether one cell will be taken as blank when it is formula and the calculated result is null or empty string. Default value is false. |
drawingsAsBlank | boolean | Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true. |
mergedCellsShrinkType | MergedCellsShrinkType | Indicates how to process merged cells when deleting blank rows/columns. |
startIndex | number | Specifies the start row/column index of the range to check and delete blank rows/columns. |
endIndex | number | Specifies the end row/column index(inclusive) of the range to check and delete blank rows/columns. Default value is -1 and -1 means the maximum range of all objects(cells, drawings, …) that need to be checked. |
updateReference | boolean | Indicates if update references in other worksheets. |
formulaChangeMonitor | AbstractFormulaChangeMonitor | Gets/sets the monitor for tracking changes caused by the deletion. |
constructor(DeleteOptions)
Constructs from a parent object convertible to this.
constructor(obj: DeleteOptions);
Parameters:
Parameter | Type | Description |
---|---|---|
obj | DeleteOptions | The parent object. |
constructor()
Default Constructor.
constructor();
emptyStringAsBlank
Whether one cell will be taken as blank when its value is empty string. Default value is true.
emptyStringAsBlank : boolean;
emptyFormulaValueAsBlank
Whether one cell will be taken as blank when it is formula and the calculated result is null or empty string. Default value is false.
emptyFormulaValueAsBlank : boolean;
Remarks
Generally user should make sure the formulas have been calculated before deleting operation with this property as true. Otherwise all newly cretaed formulas by normal apis such as Cell.Formula will be taken as blank and may be deleted because before calculation their calculated results are all null.
drawingsAsBlank
Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.
drawingsAsBlank : boolean;
Remarks
When setting this property as false, all rows/columns covered by drawing objects will not be taken as blank and will not be deleted.
mergedCellsShrinkType
Indicates how to process merged cells when deleting blank rows/columns.
mergedCellsShrinkType : MergedCellsShrinkType;
Remarks
For MergedCellsShrinkType.KeepHeaderOnly, all cells in it will be taken as blank except the non-blank top-left cell. It is the default value of this property.
For MergedCellsShrinkType.None, all cells in it will be taken as non-blank.
For MergedCellsShrinkType.ShrinkToFit, all cells outside the content display area will be taken as blank.
</br
startIndex
Specifies the start row/column index of the range to check and delete blank rows/columns.
startIndex : number;
endIndex
Specifies the end row/column index(inclusive) of the range to check and delete blank rows/columns. Default value is -1 and -1 means the maximum range of all objects(cells, drawings, …) that need to be checked.
endIndex : number;
updateReference
Indicates if update references in other worksheets.
updateReference : boolean;
formulaChangeMonitor
Gets/sets the monitor for tracking changes caused by the deletion.
formulaChangeMonitor : AbstractFormulaChangeMonitor;