i am trying to import data from excel to datagrid view. why instead of actuel data "System.__ComObject" is displayed in datagrid cell.
Dim xl As New excel.Application
Dim xlsheet As excel.Worksheet
Dim xlwbook As excel.Workbook
xlwbook = xl.Workbooks.Open("d:\PayableInput\InvoiceUpload.xlsx")
xlsheet = xlwbook.Sheets.Item(1)
Dim Rowst As Integer = 0
Dim RN As Integer = 1
DgvInvoiceDetails.Rows.Clear()
RN = 1
Dim N As Integer = 0
For N = 1 To 5
DgvInvoiceDetails.Rows.Add()
DgvInvoiceDetails.Item(0, N).Value = xlsheet.Cells(N, 1)
Next
xl.ActiveWorkbook.Close(False, "d:\PayableInput\InvoiceUpload.xlsx")
xl.Quit()
xlwbook = Nothing
xl = Nothing
thanks