-- 作者:有点色
-- 发布时间:2017/6/12 10:02:00
--
参考代码
Dim app As new MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("g:\\test.xls") Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
Dim cell1 = ws.cells(2, 3) Dim cell2 = ws.cells(4, 5) ws.Shapes.AddConnector(1, cell1.left+cell1.width/2, cell1.Top+cell1.height/2, cell2.left+cell2.width/2, cell2.Top+cell2.height/2)
wb.saved = True app.visible = True \'Ws.PrintPreview \'app.quit
|