Dim App As New MSExcel.Application
Dim Wb As MSExcel.Workbook = App.WorkBooks.open("d:\test.xls")
Dim ws As MSExcel.WorkSheet
ws = Wb.WorkSheets("excel") '被粘贴表
Dim n As Integer = ws.UsedRange.Rows.Count - 1
Dim rg As MSExcel.Range '= ws.Cells(n, 1)
app.DisplayAlerts = False
Dim Ws2 As MSExcel.WorkSheet = Wb.WorkSheets("sheet1") '被复制表
Dim Rg2 As MSExcel.Range = Ws2.UsedRange
Dim hs As Integer = Rg2.Rows.count
For i As Integer = 1 To hs
rg = ws.Cells(n, 1)
' Rg.EntireRow.Insert(MSExcel.XlInsertShiftDirection.xlShiftDown)'在基准单元格上面插入一行
Next
rg2.Copy
rg = ws.Cells(n - 1, 1)
rg.PasteSpecial()
n = ws.UsedRange.Rows.Count
'messagebox.show(n)
'Rg = Ws.cells(n - 1, 1)'以这个指定的单元格为基准
'Rg.EntireColumn.Delete(MSExcel.XlDirection.xlup) '右面的单元格左移
'Ws2.Delete
Wb.Save
app.Visible = True
运行上述代码后,如何删除第三行