Modifica i valori di regolazione della forma
Aspose.Cells per Python via .NET fornisce la proprietà Shape.geometry.shape_adjust_values per apportare modifiche ai punti di regolazione delle forme. Nell’interfaccia utente di Microsoft Excel, le regolazioni sono visualizzate come nodi a diamante gialli. Per esempio:
- Il rettangolo arrotondato ha una regolazione per cambiare l’arco
- Il triangolo ha una regolazione per cambiare la posizione del punto
- Il trapezio ha un’aggiustamento per cambiare la larghezza del lato superiore
- Le frecce hanno due ajustamenti per cambiare la forma della testa e della coda
Questo articolo spiegherà l’uso della proprietà Shape.geometry.shape_adjust_values per cambiare il valore di regolazione delle diverse forme.
Il seguente esempio di codice mostra come cambiare i valori di regolazione della forma.
| from aspose.cells import Workbook | |
| # The path to the documents directory. | |
| dataDir = "./" | |
| # Create workbook object from source excel file | |
| workbook = Workbook(dataDir + "source.xlsx") | |
| # Access first worksheet | |
| worksheet = workbook.worksheets[0] | |
| # Access first three shapes of the worksheet | |
| shape1 = worksheet.shapes[0] | |
| shape2 = worksheet.shapes[1] | |
| shape3 = worksheet.shapes[2] | |
| # Change the adjustment values of the shapes | |
| shape1.geometry.shape_adjust_values[0].value = 0.5 | |
| shape2.geometry.shape_adjust_values[0].value = 0.8 | |
| shape3.geometry.shape_adjust_values[0].value = 0.5 | |
| # Save the workbook | |
| workbook.save(dataDir + "output_out.xlsx") |