Arbeta med ThreeDFormat av form eller diagram
Contents
[
Hide
]
Möjliga användningsscenarier
Aspose.Cells tillhandahållerShape.ThreeDFormategenskap för att arbeta med 3D-formatet för form eller diagram. Den innehåller olika underegenskaper som du kan ställa in för att uppnå olika resultat enligt dina krav.
Följande skärmdump visar Microsoft Excel-gränssnitt för att ställa in 3D-formatet för form.
Arbeta med ThreeDFormat av form eller diagram
Följande exempelkod laddarsource excel-fil och kommer åt den första formen i det första kalkylbladet och ställer in underegenskaperna förShape.ThreeDFormategenskapen och sparar sedan arbetsboken ioutput excel-fil.
Exempelkod
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
// 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"); |