Send Shape Front or Back inside the Worksheet

Possible Usage Scenarios

When there are multiple shapes present in the same location, how they will be visible is decided by their z‑order positions. Aspose.Cells provides the Shape.ToFrontOrBack() method, which changes the z‑order position of a shape. If you want to send a shape to the back, you will use a negative number such as -1, -2, -3, etc., and if you want to send a shape to the front, you will use a positive number such as 1, 2, 3, etc.

Send Shape Front or Back inside the Worksheet

The following sample code explains the usage of the Shape.ToFrontOrBack() method. Please see the sample Excel file used by the code and the output Excel file generated from it. The screenshot shows the effect of the code on the sample Excel file when executed.

todo:image_alt_text

Sample Code