تعيين لون علامة التبويب للورقة العمل
Contents
[
Hide
]
يتيح لك Aspose.Cells لـ Python via .NET تغيير لون علامات تبويب أوراق العمل الفردية لجعلها تبرز من البقية. على سبيل المثال، يمكنك جعل المصروفات باللون الأحمر، المبيعات باللون الأخضر، الأصول باللون الأزرق، وغيرها.
كيفية تعيين لون علامة تبويب ورقة العمل باستخدام Microsoft Excel
- انقر بزر الماوس الأيمن فوق علامة تبويب في ورقة العلامات في أسفل ورقة العمل الحالية.
- حدد لون العلامة التبويب.
- حدد لونًا من اللوحة.
- انقر على موافق.
كيفية تعيين لون علامة تبويب ورقة العمل باستخدام مكتبة Aspose.Cells لـ Python Excel
يظهر رمز العينة أدناه كيفية تعيين لون علامة التبويب باستخدام Aspose.Cells لـ Python via .NET.
This file contains hidden or 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
from aspose.cells import Workbook | |
from aspose.pydrawing import Color | |
# 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(".") | |
# Instantiate a new Workbook | |
# Open an Excel file | |
workbook = Workbook(dataDir + "Book1.xlsx") | |
# Get the first worksheet in the book | |
worksheet = workbook.worksheets[0] | |
# Set the tab color | |
worksheet.tab_color = Color.red | |
# Save the Excel file | |
workbook.save(dataDir + "worksheettabcolor.out.xls") |