Skip to content
本页内容

LineStyle (属性)

返回或设置边框的线型。 XlLineStyle 、xlGray25、xlGray50、xlGray75 或 xlAutomatic 类型,可读写。

说明

xlfloat 和 xlSlantDashDot 不适用于图表。

示例

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