Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2010-08-29
Medium Priority
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.
Question by:Jimrustman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 43

Expert Comment

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


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

Author Comment

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.
LVL 46

Expert Comment

ID: 33559752
Are you doing this in a VSTO environment?
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!


Author Comment

ID: 33603397
XL environment
LVL 46

Expert Comment

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.

Author Comment

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.

LVL 46

Expert Comment

ID: 33607673

>>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.
LVL 34

Accepted Solution

Norie earned 500 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?

Author Closing Comment

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

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn a basic data manipulation technique of unpivoting data in Power Query for Excel 2013 and the importance of using good data. Start with data in a poor structure: Create a table on your data: Unpivot columns: Rename columns: …
Simple Linear Regression

715 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