• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Listview Item Add, nothing shows up just a long scrollbar

I don't know what I am overlooking but it should work fine from what I can see.


Dim oExcel, oWorkbook, oSheet, oNewSheet

            oExcel = CreateObject("Excel.Application")
            oWorkbook = oExcel.Workbooks.Open("C:\data.xlsx")
            oSheet = oWorkbook.Sheets("HTDB")
            Try
                For i As Integer = 0 To 90
                    CompliantSkus.Items.Add(oSheet.Range("A" & i + 1).Value)
                    CompliantName.Items.Add(oSheet.Range("B" & i + 1).Value)
                    CompliantCategory.Items.Add(oSheet.Range("C" & i + 1).Value)
                    CompliantQuantity.Items.Add(oSheet.Range("D" & i + 1).Value)
                Next

                oWorkbook.Save()
                oExcel.Quit()
                oNewSheet = Nothing
                oSheet = Nothing
                oWorkbook = Nothing
                oExcel = Nothing
            Catch

            End Try
        End If

Open in new window

0
Jack_Jones
Asked:
Jack_Jones
  • 3
1 Solution
 
käµfm³d 👽Commented:
Have you tried referring to the Text member of the Range class rather than the Value member? You may also try Value2.
0
 
Jack_JonesAuthor Commented:
Still blank, I don't get it lol!
0
 
Jack_JonesAuthor Commented:
Helps when you put columheaders in huh! LOL...
0
 
Jack_JonesAuthor Commented:
Don't forget your columheaders, duh finally figured it out.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now