在EXCEL里面画线 ActiveSheet.Shapes.AddLine BeginX, Beginy, EndX, EndY画表格 没明白你的意思,EXCEL不是表格吗? 如果是指表格加边框线的话 下例是Sheet1的Cells(1, 1)的四边加边线的例子With Sheet1.Cells(1, 1) With .Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With .Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With .Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With End With
ActiveSheet.Shapes.AddLine BeginX, Beginy, EndX, EndY画表格
没明白你的意思,EXCEL不是表格吗?
如果是指表格加边框线的话
下例是Sheet1的Cells(1, 1)的四边加边线的例子With Sheet1.Cells(1, 1)
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With