Solved

Listview Item Add, nothing shows up just a long scrollbar

Posted on 2011-09-27
4
172 Views
Last Modified: 2012-05-12
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
Comment
Question by:Jack_Jones
  • 3
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36712914
Have you tried referring to the Text member of the Range class rather than the Value member? You may also try Value2.
0
 
LVL 1

Author Comment

by:Jack_Jones
ID: 36713020
Still blank, I don't get it lol!
0
 
LVL 1

Accepted Solution

by:
Jack_Jones earned 0 total points
ID: 36713208
Helps when you put columheaders in huh! LOL...
0
 
LVL 1

Author Closing Comment

by:Jack_Jones
ID: 36898984
Don't forget your columheaders, duh finally figured it out.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Programmatically signing Word macros 4 61
Help with sorting data in Listbox using VB.NET 3 53
Help with Syntax 9 29
Vb. Net application freezes 9 31
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now