主题
IncludeFont (属性)
如果样式包含 Background、Bold、Color、ColorIndex、FontStyle、Italic、Name、Size、Strikethrough、Subscript、Superscript和 Underline字体属性,则此属性为 True。bool 类型,可读写。
示例
python
#本示例在 Sheet1 的 A1 单元格样式中加入字体格式
def test():
Application.Worksheets.Item("Sheet1").Range("A1").Style.IncludeFont = True
python
#本示例显示活动工作表中B2单元格样式是否加入字体格式
def test():
range = ActiveSheet.Range("B2")
print(range.Style.IncludeFont)