DeleteBlankOptions

DeleteBlankOptions class

Represents the setting of deleting blank cells/rows/columns.

class DeleteBlankOptions extends DeleteOptions;

Constructors

ConstructorDescription
constructor(DeleteOptions)Constructs from a parent object convertible to this.
constructor()Default Constructor.

Properties

PropertyTypeDescription
emptyStringAsBlankbooleanWhether one cell will be taken as blank when its value is empty string. Default value is true.
emptyFormulaValueAsBlankbooleanWhether one cell will be taken as blank when it is formula and the calculated result is null or empty string. Default value is false.
drawingsAsBlankbooleanWhether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.
mergedCellsShrinkTypeMergedCellsShrinkTypeIndicates how to process merged cells when deleting blank rows/columns.
startIndexnumberSpecifies the start row/column index of the range to check and delete blank rows/columns.
endIndexnumberSpecifies 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.
updateReferencebooleanIndicates if update references in other worksheets.
formulaChangeMonitorAbstractFormulaChangeMonitorGets/sets the monitor for tracking changes caused by the deletion.

Methods

MethodDescription
getEmptyStringAsBlank()@deprecated. Please use the ’emptyStringAsBlank’ property instead. Whether one cell will be taken as blank when its value is empty string. Default value is true.
setEmptyStringAsBlank(boolean)@deprecated. Please use the ’emptyStringAsBlank’ property instead. Whether one cell will be taken as blank when its value is empty string. Default value is true.
getEmptyFormulaValueAsBlank()@deprecated. Please use the ’emptyFormulaValueAsBlank’ property instead. 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.
setEmptyFormulaValueAsBlank(boolean)@deprecated. Please use the ’emptyFormulaValueAsBlank’ property instead. 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.
getDrawingsAsBlank()@deprecated. Please use the ‘drawingsAsBlank’ property instead. Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.
setDrawingsAsBlank(boolean)@deprecated. Please use the ‘drawingsAsBlank’ property instead. Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.
getMergedCellsShrinkType()@deprecated. Please use the ‘mergedCellsShrinkType’ property instead. Indicates how to process merged cells when deleting blank rows/columns.
setMergedCellsShrinkType(MergedCellsShrinkType)@deprecated. Please use the ‘mergedCellsShrinkType’ property instead. Indicates how to process merged cells when deleting blank rows/columns.
getStartIndex()@deprecated. Please use the ‘startIndex’ property instead. Specifies the start row/column index of the range to check and delete blank rows/columns.
setStartIndex(number)@deprecated. Please use the ‘startIndex’ property instead. Specifies the start row/column index of the range to check and delete blank rows/columns.
getEndIndex()@deprecated. Please use the ’endIndex’ property instead. 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.
setEndIndex(number)@deprecated. Please use the ’endIndex’ property instead. 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.
isNull()Checks whether the implementation object is null.
getUpdateReference()@deprecated. Please use the ‘updateReference’ property instead. Indicates if update references in other worksheets.
setUpdateReference(boolean)@deprecated. Please use the ‘updateReference’ property instead. Indicates if update references in other worksheets.
getFormulaChangeMonitor()@deprecated. Please use the ‘formulaChangeMonitor’ property instead. Gets/sets the monitor for tracking changes caused by the deletion.
setFormulaChangeMonitor(AbstractFormulaChangeMonitor)@deprecated. Please use the ‘formulaChangeMonitor’ property instead. 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:

ParameterTypeDescription
objDeleteOptionsThe 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;

getEmptyStringAsBlank()

@deprecated. Please use the ’emptyStringAsBlank’ property instead. Whether one cell will be taken as blank when its value is empty string. Default value is true.

getEmptyStringAsBlank() : boolean;

setEmptyStringAsBlank(boolean)

@deprecated. Please use the ’emptyStringAsBlank’ property instead. Whether one cell will be taken as blank when its value is empty string. Default value is true.

setEmptyStringAsBlank(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getEmptyFormulaValueAsBlank()

@deprecated. Please use the ’emptyFormulaValueAsBlank’ property instead. 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.

getEmptyFormulaValueAsBlank() : 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.

setEmptyFormulaValueAsBlank(boolean)

@deprecated. Please use the ’emptyFormulaValueAsBlank’ property instead. 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.

setEmptyFormulaValueAsBlank(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

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.

getDrawingsAsBlank()

@deprecated. Please use the ‘drawingsAsBlank’ property instead. Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.

getDrawingsAsBlank() : 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.

setDrawingsAsBlank(boolean)

@deprecated. Please use the ‘drawingsAsBlank’ property instead. Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.

setDrawingsAsBlank(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

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.

getMergedCellsShrinkType()

@deprecated. Please use the ‘mergedCellsShrinkType’ property instead. Indicates how to process merged cells when deleting blank rows/columns.

getMergedCellsShrinkType() : MergedCellsShrinkType;

Returns

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

setMergedCellsShrinkType(MergedCellsShrinkType)

@deprecated. Please use the ‘mergedCellsShrinkType’ property instead. Indicates how to process merged cells when deleting blank rows/columns.

setMergedCellsShrinkType(value: MergedCellsShrinkType) : void;

Parameters:

ParameterTypeDescription
valueMergedCellsShrinkTypeThe value to set.

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

getStartIndex()

@deprecated. Please use the ‘startIndex’ property instead. Specifies the start row/column index of the range to check and delete blank rows/columns.

getStartIndex() : number;

setStartIndex(number)

@deprecated. Please use the ‘startIndex’ property instead. Specifies the start row/column index of the range to check and delete blank rows/columns.

setStartIndex(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getEndIndex()

@deprecated. Please use the ’endIndex’ property instead. 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.

getEndIndex() : number;

setEndIndex(number)

@deprecated. Please use the ’endIndex’ property instead. 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.

setEndIndex(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getUpdateReference()

@deprecated. Please use the ‘updateReference’ property instead. Indicates if update references in other worksheets.

getUpdateReference() : boolean;

setUpdateReference(boolean)

@deprecated. Please use the ‘updateReference’ property instead. Indicates if update references in other worksheets.

setUpdateReference(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getFormulaChangeMonitor()

@deprecated. Please use the ‘formulaChangeMonitor’ property instead. Gets/sets the monitor for tracking changes caused by the deletion.

getFormulaChangeMonitor() : AbstractFormulaChangeMonitor;

Returns

AbstractFormulaChangeMonitor

setFormulaChangeMonitor(AbstractFormulaChangeMonitor)

@deprecated. Please use the ‘formulaChangeMonitor’ property instead. Gets/sets the monitor for tracking changes caused by the deletion.

setFormulaChangeMonitor(value: AbstractFormulaChangeMonitor) : void;

Parameters:

ParameterTypeDescription
valueAbstractFormulaChangeMonitorThe value to set.