Add ActiveX Controls using Aspose.Cells
Contents
[
Hide
]
You can add ActiveX controls with Aspose.Cells using the ShapeCollection.addActiveXControl() method. This method takes a parameter ControlType which tells what type of ActiveX control needs to be added inside a worksheet. It has the following values.
- CHECK_BOX
- COMBO_BOX
- COMMAND_BUTTON
- IMAGE
- LABEL
- LIST_BOX
- RADIO_BUTTON
- SCROLL_BAR
- SPIN_BUTTON
- TEXT_BOX
- TOGGLE_BUTTON
- UNKNOWN
Once, you have added the ActiveX control inside the shape collection, you can then access the ActiveX control object via Shape.ActiveXControl property and then set its various properties.
Add Toggle Button ActiveX Control using Aspose.Cells
The following sample code adds Toggle Button ActiveX Control using Aspose.Cells. Please download the output excel file generated with this code for your reference.