主题
Tab (属性)
返回一个工作表的 Tab 对象。
示例
python
#此示例确定第一张工作表选项卡的颜色索引是否设置为无,并通知用户
def test():
# Determine if color index of 1st tab is set to none.
if Worksheets.Item(1).Tab.ColorIndex == xlColorIndexNone:
print("The color index is set to none for the 1st worksheet tab.")
else:
print("The color index for the tab of the 1st worksheet is not set none.")
python
#此示例显示活动工作表选项卡的颜色
def test():
print(Application.ActiveSheet.Tab.Color)