Arbeta med ThreeDFormat av form eller diagram
Contents
[
Hide
]
Möjliga användningsscenarier
Aspose.Cells tillhandahållerShape.ThreeDFormat egendom tillsammans medThreeDFormat klass för att arbeta med 3D-formatet för form eller diagram. DeThreeDFormatklass innehåller olika egenskaper som kan ställas in för att uppnå olika resultat enligt applikationskrav.
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.
This file contains 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-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Load excel file containing a shape | |
Workbook wb = new Workbook(dataDir + "sample.xlsx"); | |
// Access first worksheet | |
Worksheet ws = wb.Worksheets[0]; | |
// Access first shape | |
Shape sh = ws.Shapes[0]; | |
// Apply different three dimensional settings | |
ThreeDFormat n3df = sh.ThreeDFormat; | |
n3df.ContourWidth = 17; | |
n3df.ExtrusionHeight = 32; | |
// Save the output excel file in xlsx format | |
wb.Save(dataDir + "output_out.xlsx"); |