including excel data in a new vb app during build (VB2010)
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: including excel data in a new vb app during build (VB2010)

  1. #1
    Join Date
    Nov 2010
    Posts
    4

    Question including excel data in a new vb app during build (VB2010)

    Hi, I am working on a project for a local charity to build a library catalogue of their books/music. I have built the main form and database but I would like to include the data they have already collated in excel (over 1000 records) so that it doenst have to be manually input into the finished program.

    is there an easy way to do this, I tried a cut and paste from excel into the data table in my project but unless I'm doing something wrong it wont let me paste the data into the table.

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: including excel data in a new vb app during build (VB2010)

    Save it in Excel, and EXPORT it to a delimited-file. It will let you choose which columns, their order, and format them for you to read in.

    Then, you can create a one-time app to import that data.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Nov 2010
    Posts
    4

    Re: including excel data in a new vb app during build (VB2010)

    thank you, by delimited file I am assuming you mean something like a .csv file?

    also can I import this data before I compile my final .exe for my project, or do I have to wait until my project is complete before importing?

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: including excel data in a new vb app during build (VB2010)

    Really doesn't matter. You should probably keep an empty copy of the program, ready to turn in, after IMPORTING any file that you might want.

    Also, sample data with different values would be a benefit to test your code.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center