組み込みのスタイルを使用してワード アート テキストを追加する

考えられる使用シナリオ

Aspose.Cells を使用して、組み込みのスタイルでワード アート テキストを追加できます。ShapeCollection.AddWordArt()この目的のためのメソッド。

組み込みのスタイルを使用してワード アート テキストを追加する

次のサンプル コードは、さまざまな組み込みスタイルを持つワード アート テキストを追加します。を確認してください出力エクセルファイルこのコードで生成されます。このように出力エクセルファイルMicrosoft Excel で検索します。

todo:画像_代替_文章

// 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);
// Create workbook object
Workbook wb = new Workbook();
// Access first worksheet
Worksheet ws = wb.Worksheets[0];
// Add Word Art Text with Built-in Styles
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle1, "Aspose File Format APIs", 00, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle2, "Aspose File Format APIs", 10, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle3, "Aspose File Format APIs", 20, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle4, "Aspose File Format APIs", 30, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle5, "Aspose File Format APIs", 40, 0, 0, 0, 100, 800);
// Save the workbook in xlsx format
wb.Save(dataDir + "output_out.xlsx");