Link to home
Start Free TrialLog in
Avatar of Jack_Jones
Jack_Jones

asked on

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

Avatar of kaufmed
kaufmed
Flag of United States of America image

Have you tried referring to the Text member of the Range class rather than the Value member? You may also try Value2.
Avatar of Jack_Jones
Jack_Jones

ASKER

Still blank, I don't get it lol!
ASKER CERTIFIED SOLUTION
Avatar of Jack_Jones
Jack_Jones

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Don't forget your columheaders, duh finally figured it out.