Modifica i valori di regolazione della forma

Modifica dei valori di regolazione della forma

Il codice di esempio seguente accede alle prime tre forme del primo foglio di lavoro nel file di Excel di origine e quindi cambia i valori di ajustamento delle forme. Le schermate seguenti mostrano come appaiono le forme prima e dopo aver cambiato i valori di ajustamento.

Disegno delle Forme Prima del Cambiamento dei Valori di Ajustamento

todo:image_alt_text

Disegno delle Forme Dopo il Cambiamento dei Valori di Ajustamento

todo:image_alt_text

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(ChangeAdjustmentValuesOfShape.class);
// Create workbook object from source excel file
Workbook workbook = new Workbook(dataDir + "source.xlsx");
// Access first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
// Access first three shapes of the worksheet
Shape shape1 = worksheet.getShapes().get(0);
Shape shape2 = worksheet.getShapes().get(1);
Shape shape3 = worksheet.getShapes().get(2);
// Change the adjustment values of the shapes
shape1.getGeometry().getShapeAdjustValues().get(0).setValue(0.5d);
shape2.getGeometry().getShapeAdjustValues().get(0).setValue(0.8d);
shape3.getGeometry().getShapeAdjustValues().get(0).setValue(0.5d);
// Save the workbook
workbook.save(dataDir + "output.xlsx");