Şekil veya Grafik ThreeDFormat ile Çalışma
Olası Kullanım Senaryoları
Aspose.Cells, şekil veya grafiklerin 3-D Formatı ile çalışmak için Shape.ThreeDFormat özelliğini ve ThreeDFormat sınıfını sağlar. ThreeDFormat sınıfı, farklı özellikleri içerir ve uygulama gereksinimlerine göre farklı sonuçlara ulaşmak için ayarlanabilir.
Şekil veya Grafik ThreeDFormat ile Çalışma
Aşağıdaki örnek kod, kaynak excel dosyasını yükler ve ilk çalışma sayfasındaki ilk şekle erişir ve Shape.ThreeDFormat özelliğinin alt özelliklerini ayarlar ve ardından çalışma kitabını çıktı excel dosyasına kaydeder.
// 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"); |