Lavorare con il ThreeDFormat della forma o del grafico

Possibili Scenari di Utilizzo

Aspose.Cells fornisce la proprietà Shape.ThreeDFormat per lavorare con il Formato 3D della forma o del grafico. Contiene diverse sottoproprietà che è possibile impostare per ottenere risultati diversi in base alle proprie esigenze.

La seguente schermata mostra l’interfaccia di Microsoft Excel per impostare il Formato 3D della forma.

todo:image_alt_text

Lavorare con il ThreeDFormat della forma o del grafico

Il seguente codice di esempio carica il file Excel di origine e accede alla prima forma nella prima scheda e imposta le sottoproprietà della proprietà Shape.ThreeDFormat e quindi salva il documento di lavoro nel file Excel di output.

Codice di Esempio

// 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.getSharedDataDir(WorkingWithThreeDFormat.class) + "articles/";
//Load excel file containing a shape
Workbook wb = new Workbook(dataDir + "WorkingWithThreeDFormat_in.xlsx");
//Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);
//Access first shape
Shape sh = ws.getShapes().get(0);
//Apply different three dimensional settings
ThreeDFormat n3df = sh.getThreeDFormat();
n3df.setContourWidth(17);
n3df.setExtrusionHeight(32);
n3df.setTopBevelType(BevelType.HARD_EDGE);
n3df.setTopBevelWidth (30);
n3df.setTopBevelHeight(30);
//Save the output excel file in xlsx format
wb.save(dataDir + "WorkingWithThreeDFormat_out.xlsx");