Microsoft excel 9.0 oject

解决方案 »

  1.   

    什么意思啊,不用Excel的表格,还要导出到excel中?
      

  2.   

    在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
      

  3.   

    最省力的方法:在EXCEL中新建一个宏,录制下你需要添加的框线,再把整个宏中的命令复制到程序中。修改相应的行列号就可以了。