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 determined by their Z‑order positions. Aspose.Cells for Python via .NET provides the Shape.to_front_or_back() method, which changes the Z‑order position of a shape. If you want to send the shape to the back, you will use a negative number such as -1, -2, -3, etc., and if you want to send the 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.to_front_or_back() method. Please see the sample Excel file used in the code and the output Excel file generated by it. The screenshot shows the effect of the code on the sample Excel file when executed.

todo:image_alt_text

Sample Code