Convert the Smart Art to Group Shape

Possible Usage Scenarios

You can convert Smart Art Shape into Group Shape using the Shape.get_result_of_smart_art() method. It will enable you to handle smart art shape like a group shape. Consequently, you will have access to the individual parts or shapes of the group shape.

Convert the Smart Art to Group Shape

The following sample code loads the sample Excel file containing a smart art shape as shown in this screenshot. It then converts the smart art shape into group shape and prints the Shape.IsGroup property. Please see the console output of the sample code given below.

todo:image_alt_text

Sample Code

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Load the sample smart art shape - Excel file
wb = Workbook("sampleSmartArtShape_GetResultOfSmartArt.xlsx")
# Access first worksheet
ws = wb.worksheets[0]
# Access first shape
sh = ws.shapes[0]
# Determine if shape is smart art
print("Is Smart Art Shape: " + str(sh.is_smart_art))
# Determine if shape is group shape
print("Is Group Shape: " + str(sh.is_group))
# Convert smart art shape into group shape
print("Is Group Shape: " + str(sh.get_result_of_smart_art().is_group))

Console Output

Is Smart Art Shape: True

Is Group Shape: False

Is Group Shape: True