Önceden Ayarlanmış Kelime Sanatı Stilini Şeklin Metni Olarak Ayarla

Olası Kullanım Senaryoları

Aspose.Cells kullanarak şeklin metninin önceden ayarlanmış kelime sanatı stilini ayarlayabilirsiniz. Bu amaçla lütfen FontSetting.SetWordArtStyle() veya FontSettingCollection.SetWordArtStyle() yöntemlerini kullanın.

Metin şeklinin metnine önceden ayarlanmış WordArt stili ayarlayın

Aşağıdaki örnek kod, bir metin kutusu oluşturur ve ardından metninin önceden ayarlanmış kelime sanatı stilini FontSetting.SetWordArtStyle() yöntemi kullanarak ayarlar. Bu, Microsoft Excel’de çıktı excel dosyasının nasıl göründüğüdür.

todo:image_alt_text

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Create workbook object
Workbook workbook = new Workbook();
// Access first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Create a textbox with some text
TextBox textbox = worksheet.Shapes.AddTextBox(0, 0, 0, 0, 100, 700);
textbox.Text = "Aspose File Format APIs";
textbox.Font.Size = 44;
// Sets preset WordArt style to the text of the shape.
FontSetting fntSetting = textbox.GetRichFormattings()[0] as FontSetting;
fntSetting.SetWordArtStyle(PresetWordArtStyle.WordArtStyle3);
// Save the workbook in xlsx format
workbook.Save(outputDir + "outputSetPresetWordArtStyle.xlsx");