Set preset WordArt style to the text of the shape

Possible Usage Scenarios

You can set preset WordArt style to the text of the shape using Aspose.Cells. Please use FontSetting.SetWordArtStyle() or FontSettingCollection.SetWordArtStyle() methods for this purpose.

Set preset WordArt style to the text of the shape

The following sample code creates a text box with some text and then sets preset WordArt style of its text using FontSetting.SetWordArtStyle() method. This is how the output excel file looks in Microsoft Excel.

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");