أضف علامة WordArt المائية إلى التخطيط
Contents
[
Hide
]
يمكنك استخدام WordArt لإضافة تأثيرات نصية خاصة إلى جداول البيانات. على سبيل المثال ، قم بتمديد عنوان ، أو تزيين النص ، أو جعل النص يتناسب مع شكل معين مسبقًا ، أو قم بتطبيق النص المتأثر على منطقة الرسم في المخطط كعلامة مائية. يصبح WordArt عنصرًا يمكنك نقله أو وضعه في جداول البيانات لإضافة زخرفة.
يوضح المثال التالي كيفية إضافة شكل WordArt كعلامة مائية لمنطقة رسم المخطط.
يوضح المثال التالي كيفية إضافة شكل WordArt كعلامة مائية لمنطقة الرسم التخطيطي الموجودة.
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); | |
// Open the existing excel file. | |
Workbook workbook = new Workbook(dataDir + "sample.xlsx"); | |
// Get the chart in the first worksheet. | |
Aspose.Cells.Charts.Chart chart = workbook.Worksheets[0].Charts[0]; | |
// Add a WordArt watermark (shape) to the chart's plot area. | |
Aspose.Cells.Drawing.Shape wordart = chart.Shapes.AddTextEffectInChart(MsoPresetTextEffect.TextEffect2, | |
"CONFIDENTIAL", "Arial Black", 66, false, false, 1200, 500, 2000, 3000); | |
// Get the shape's fill format. | |
FillFormat wordArtFormat = wordart.Fill; | |
// Set the transparency. | |
wordArtFormat.Transparency = 0.9; | |
// Get the line format. | |
LineFormat lineFormat = wordart.Line; | |
// Set Line format to invisible. | |
lineFormat.Weight = 0.0; | |
// Save the excel file. | |
workbook.Save(dataDir + "output_out.xlsx"); |