Solved

Copy list(of T) to Excel (2003) spreadsheet from Visual Basic Project (or Dataset)

Posted on 2010-08-29
9
365 Views
Last Modified: 2012-06-27
I have a VB Project and need to copy list(of T)  or Datasets (not visible) from Visual Basic Projet to generate a spreadsheel in a new or existing Excel workbook.
0
Comment
Question by:Jimrustman
9 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 33556030
Please give some more explanation.

Also,

What is list (of T)?
What do you mean by (not visible)
0
 

Author Comment

by:Jimrustman
ID: 33559415
list(of T) is VB collection generality where T is some general class.  Such as list(of string) or list(of Integer) or list(of ClassTime) .  T represents a general object.

Not viibile implies that the list is never exposed to a gridview or data view or any form object.  It is strickly a VB collection or array.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33559752
Are you doing this in a VSTO environment?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:Jimrustman
ID: 33603397
XL environment
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33603419
If you're in an Excel environment, you are limited by the VBA.  The List (of T) syntax is a .Net construct.  That's why I asked you about VSTO.
0
 

Author Comment

by:Jimrustman
ID: 33607603
I'm not in a VBA environment, notice I said a VB project.    Yes, list(of T) is a .Net construct, and is also available to VB Project work also.    I would prefer to use this as a VB class to fit into a Class library, but could use a solution outside of a library.  

I am coming quickly to the conclusion that it is not possible to form a solution independent of year (2000, to 2006, excluding 2007)  and I'm working to generate a csv file that can the be manually loaded into Excel.  This does seem junkie, but it works.

Thanks
0
 
LVL 45

Expert Comment

by:aikimark
ID: 33607673
@Jimrustman

>>I'm not in a VBA environment, notice I said a VB project.

This question is in the VB classic zone and general spreadsheet software zone.  Both of these are pretty far removed from VB.Net.  Your "VB Project" response is applicable to both VB classic and VB.Net development environments and Excel VBA development also has a "project" organization.

It is for these reasons, and the "list(of T)" subject at the heart of your question that I asked my VSTO and VBA questions.  If we can get the development and run-time environments nailed down, I can help you get this question into the proper zones.  This will expose your question to the appropriate subject matter experts.
0
 
LVL 33

Accepted Solution

by:
Norie earned 250 total points
ID: 33612403
Why don't you generate the CSV file and automatically open it in Excel?

How are you currently using Excel in the code?

Are you using it?
0
 

Author Closing Comment

by:Jimrustman
ID: 33653787
Didn't really solve the problem, just offered a work around that was somewhat obvious
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split53 challenge 7 97
Automatic sort formula 8 53
EXCEL 2013 question. 4 28
Copy a range from 1..n excel sheets to one destination sheet 2 33
A short article about a problem I had getting the GPS LocationListener working.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to find and create templates in Excel 2013.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

778 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