ShapeCollection class
ShapeCollection class
Represents all the shape in a worksheet/chart.
The ShapeCollection type exposes the following members:
Properties
Property | Description |
---|---|
capacity | Gets or sets the number of elements that the array list can contain. |
Methods
Method | Description |
---|---|
add_shape_in_chart | Add a shape to chart .All unit is 1/4000 of chart area. |
add_shape_in_chart | Add a shape to chart .All unit is 1/4000 of chart area. |
add_shape_in_chart_by_scale | Add a shape to chart. All unit is percent scale of chart area. |
add_shape_in_chart_by_scale | Add a shape to chart .All unit is 1/4000 of chart area. |
add_picture | Adds a picture to the collection. |
add_picture | Adds a picture to the collection. |
copy_to | Copies the entire array list to a compatible one-dimensional array list, starting at the beginning of the target array list. |
copy_to | Copies a range of elements from the array list to a compatible one-dimensional array list, starting at the specified index of the target array list. |
index_of | Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the array list that extends from the specified index to the last element. |
index_of | Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the array list that starts at the specified index and contains the specified number of elements. |
last_index_of | Searches for the specified object and returns the zero-based index of the last occurrence within the entire array list. |
last_index_of | Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the array list that extends from the first element to the specified index. |
last_index_of | Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the array list that contains the specified number of elements and ends at the specified index. |
add_copy | Adds and copy a shape to the worksheet. |
add_check_box | Adds a checkbox to the worksheet. |
add_text_box | Adds a text box to the worksheet. |
add_equation | Add an equation object to the worksheet. |
add_spinner | Adds a Spinner to the worksheet. |
add_scroll_bar | Adds a ScrollBar to the worksheet. |
add_radio_button | Adds a RadioButton to the worksheet. |
add_list_box | Adds a ListBox to the worksheet. |
add_combo_box | Adds a ComboBox to the worksheet. |
add_group_box | Adds a GroupBox to the worksheet. |
add_button | Adds a Button to the worksheet. |
add_label | Adds a Label to the worksheet. |
add_label_in_chart | Adds a label to the chart. |
add_text_box_in_chart | Adds a textbox to the chart. |
add_text_effect_in_chart | Inserts a WordArt object to the chart |
add_text_effect | Inserts a WordArt object. |
add_word_art | Adds preset WordArt since Excel 2007.s |
add_rectangle | Adds a RectangleShape to the worksheet. |
add_oval | Adds a Oval to the worksheet. |
add_line | Adds a LineShape to the worksheet. |
add_free_floating_shape | Adds a free floating shape to the worksheet.Only applies for line/image shape. |
add_arc | Adds a ArcShape to the worksheet. |
add_shape | Adds a Shape to the worksheet. |
add_auto_shape | Adds a AutoShape to the worksheet. |
add_auto_shape_in_chart | Adds a AutoShape to the chart. |
add_active_x_control | Creates an Activex Control. |
add_svg | Adds svg image. |
add_icons | Adds svg image. |
add_linked_picture | Add a linked picture. |
add_ole_object_with_linked_image | Add a linked picture. |
add_picture_in_chart | Adds a picture to the chart. |
add_ole_object | Adds an OleObject. |
copy_comments_in_range | Copy all comments in the range. |
copy_in_range | Copy shapes in the range to destination range. |
delete_in_range | Delete shapes in the range.Comment shapes will not be deleted. |
delete_shape | Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted. |
group | Group the shapes. |
ungroup | Ungroups the shape items. |
remove_a_shape | Add API for Python Via .Net.since this API is unsupported |
update_selected_value | Update the selected value by the value of the linked cell or range of the shape. |
add_freeform | Adds a freeform shape to the worksheet. |
add_signature_line | Adds a Signature Line to the worksheet. |
binary_search | Searches the entire sorted array list for an element using the default comparer and returns the zero-based index of the element. |
Example
from aspose.cells import Workbook
# Instantiating a Workbook object
workbook = Workbook()
# get ShapeCollection
shapes = workbook.worksheets[0].shapes
# do your business
# Save the excel file.
workbook.save("result.xlsx")
See Also
- module
aspose.cells.drawing