الحصول على مجموعات الرموز، شرائط البيانات، أو كائنات المقياس اللوني المستخدمة في التنسيق الشرطي

Contents
[ ]

تُظهر الشفرة النموذجية التالية كيفية قراءة مجموعات الرموز التي تستخدم للتنسيق الشرطي. باستخدام واجهة برمجة التطبيقات البسيطة لـ Aspose.Cell، يتم حفظ بيانات الصورة لمجموعة الرموز كصورة.

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
# Open a template Excel file
workbook = Workbook(dataDir + "book1.xlsx")
# Get the first worksheet in the workbook
sheet = workbook.worksheets[0]
# Get the A1 cell
cell = sheet.cells.get("A1")
# Get the conditional formatting result object
cfr = cell.get_conditional_formatting_result()
# Get the icon set
icon = cfr.conditional_formatting_icon
# Create the image file based on the icon's image data
with open(dataDir + "imgIcon.out.jpg", "wb") as f:
f.write(icon.image_data)