Skip to content
本页内容

LineStyle (属性)

返回或设置边框的线型。 XlLineStylexlGray25xlGray50xlGray75xlAutomatic 类型,可读写。

说明

xlfloatxlSlantDashDot 不适用于图表。

示例

python
#本示例为 Chart1 的图表区和绘图区域设置边框
def test():
    chart = Application.Charts.Item("Chart1")
    chart.ChartArea.Border.LineStyle = xlDashDot
    border = chart.PlotArea.Border
    border.LineStyle = xlDashDotDot
    border.Weight = xlThick
python
#本示例将 H6 单元格的顶部的边框线样式设置为虚线
def test():
    Range("H6").Borders.Item(xlEdgeTop).LineStyle = xlDash