إضافة نص فني بأنماط مضمنة
Contents
[
Hide
]
سيناريوهات الاستخدام المحتملة
يمكنك إضافة نص فني بكلتات مدمجة باستخدام Aspose.Cells. يرجى استخدام طريقة ShapeCollection.AddWordArt() لهذا الغرض.
إضافة نص Word Art بأنماط مدمجة
يقوم الكود النموذجي التالي بإضافة نصوص فنية بأنماط مدمجة مختلفة. يُرجى التحقق من ملف الإكسل الناتج الذي تم إنشاؤه بهذا الكود. هكذا يبدو ملف الإكسل الناتج في Microsoft Excel.
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); | |
// 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"); |