Eliminar Control ActiveX
Contents
[
Hide
]
Eliminar control ActiveX
Aspose.Cells para Python via .NET proporciona la capacidad de eliminar controles ActiveX de los libros de trabajo. Para ello, la API proporciona el método Shape.remove_active_x_control. El siguiente fragmento de código demuestra el uso del método Shape.remove_active_x_control para eliminar un control ActiveX.
Código de muestra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Source directory | |
sourceDir = RunExamples.Get_SourceDirectory() | |
# Output directory | |
outputDir = RunExamples.Get_OutputDirectory() | |
# Create a workbook | |
wb = Workbook(sourceDir + "sampleUpdateActiveXComboBoxControl.xlsx") | |
# Access first shape from first worksheet | |
shape = wb.worksheets[0].shapes[0] | |
# Access ActiveX ComboBox Control and update its value | |
if shape.active_x_control != None: | |
# Remove Shape ActiveX Control | |
shape.remove_active_x_control() | |
# Save the workbook | |
wb.save(outputDir + "RemoveActiveXControl_our.xlsx") |