使用vb.net合并数据时出错。请帮忙。
Imports Microsoft.Office.Interop
Public Class Form1
Dim xlsWorkSheet As Excel.Worksheet
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim xlsApp As New Excel.Application
xlsApp.Visible = True
Dim xlsWorkbook As Excel.Workbook = xlsApp.Workbooks.Open("C:\Users\hwai\Desktop\Consolidate.xlsx")
lsWorkSheet.Range("H1").Select().Consolidate("'C:\Users\hwai\Desktop\[Consolidate.xlsx]Sheet1'!A1:B8", _Function:=-4112, TopRow:=False, LeftColumn:=True, CreateLinks:=False)
End Sub
任何帮助表示感谢。