HotXLS Docs

DeleteInRange method

Deletes shapes whose OfficeArt client anchors intersect the specified worksheet range. Returns the number of shapes deleted.

Syntax

function DeleteInRange(ARow1, ACol1, ARow2, ACol2: Integer): Integer;
ARow1 Required Integer. The 1-based first row of the target range.
ACol1 Required Integer. The 1-based first column of the target range.
ARow2 Required Integer. The 1-based last row of the target range.
ACol2 Required Integer. The 1-based last column of the target range.

Remarks

Row and column arguments use the same 1-based coordinates as the worksheet object model. If the start and end coordinates are reversed, HotXLS normalises them before matching shapes.

Example

This example removes shapes anchored in the area B2:D8 on sheet one.

DeletedCount := Workbook.Sheets[1].Shapes.DeleteInRange(2, 2, 8, 4);