Skip to content
本页内容

DisplayFormat (属性)

返回代表指定区域的显示设置的 DisplayFormat 对象。只读

返回值

DisplayFormat

示例

python
#本示例将 A1 单元格的字体加粗,并使用 DisplayFormat 检查
def test():
    Range("A1").Font.Bold = True
    print(Range("A1").DisplayFormat.Font.Bold)
python
#本示例将 C5 单元格的内部颜色设置为红色,并使用 DisplayFormat 检查
def test():
    Range("C5").Interior.Color = RGB(255, 0, 0)
    print(Range("C5").DisplayFormat.Interior.Color)