استبدال النص في شكل ذكاء ذكي

سيناريوهات الاستخدام المحتملة

الذكاء الذكي هو أحد الكائنات الرئيسية في دفتر العمل. في كثير من الأحيان هناك حاجة لتحديث النص في الذكاء الذكي. توفر Aspose.Cells هذه الميزة عن طريق ضبط الخاصية Shape.text.

يمكن تنزيل ملف المصدر من الرابط التالي:

SmartArt.xlsx

الكود المثالي

from aspose.cells import OoxmlSaveOptions, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
wb = Workbook(sourceDir + "SmartArt.xlsx")
for worksheet in wb.worksheets:
for shape in worksheet.shapes:
shape.alternative_text = "ReplacedAlternativeText"
if shape.is_smart_art:
for smartart in shape.get_result_of_smart_art().get_grouped_shapes():
smartart.text = "ReplacedText"
options = OoxmlSaveOptions()
options.update_smart_art = True
wb.save(outputDir + "outputSmartArt.xlsx", options)