Class DeleteBlankOptions
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
Represents the setting of deleting blank cells/rows/columns.
public class DeleteBlankOptions : DeleteOptions
Inheritance
object ← DeleteOptions ← DeleteBlankOptions
Inherited Members
DeleteOptions.UpdateReference, DeleteOptions.FormulaChangeMonitor, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
DeleteBlankOptions()
public DeleteBlankOptions()
Properties
DrawingsAsBlank
Whether drawing related objects such as picture, shape, chart… will be taken as blank. Default value is true.
public bool DrawingsAsBlank { get; set; }
Property Value
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.
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.
public bool EmptyFormulaValueAsBlank { get; set; }
Property Value
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 Aspose.Cells.Cell.Formula will be taken as blank and may be deleted because before calculation their calculated results are all null.
EmptyStringAsBlank
Whether one cell will be taken as blank when its value is empty string. Default value is true.
public bool EmptyStringAsBlank { get; set; }
Property Value
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.
public int EndIndex { get; set; }
Property Value
MergedCellsShrinkType
Indicates how to process merged cells when deleting blank rows/columns.
public MergedCellsShrinkType MergedCellsShrinkType { get; set; }
Property Value
Remarks
For Aspose.Cells.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 Aspose.Cells.MergedCellsShrinkType.None, all cells in it will be taken as non-blank.
For Aspose.Cells.MergedCellsShrinkType.ShrinkToFit, all cells outside the content display area will be taken as blank.
StartIndex
Specifies the start row/column index of the range to check and delete blank rows/columns.
public int StartIndex { get; set; }