Results 1 to 12 of 12

Thread: need vb program to read csv file

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    18

    Resolved need vb program to read csv file

    I have a comma delimited data file and I want to make a program to read and display the data in a specific format.
    Last edited by exactajack; Apr 11th, 2005 at 12:59 PM.

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: need vb program to read csv file

    Do you need help doing this or do you want someone to do this for you? If you just need help I'll move it for you.


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: need vb program to read csv file

    Not 100% sure - but I think I've seen people post that they can read a CSV file with ADO - search the forum.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: need vb program to read csv file

    Actually I was thinking more of opening the file, reading line by line and split each line by the comma character, wouldn't that work?


    Has someone helped you? Then you can Rate their helpful post.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    18

    Re: need vb program to read csv file

    what do you mean move it for me?
    I've had as much of the file that will fit in excel to see how the file is set up. I don't have the programming knowledge to get the data that I need out and display it.

  6. #6
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: need vb program to read csv file

    CSV is complex to read - it's got quotes around text data that has commas imbedded - stuff like that. You can't use SPLIT - the function always suggested for it.

    If you are looking to do this one time only, use EXCEL.

    If you want a program - here's a link to use ADO - I just did a search for CSV and ADO...

    http://www.vbforums.com/showthread.p...hlight=csv+ado

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    18

    Re: need vb program to read csv file

    it's over 255 fields. I tried to declare variables to read it into vb but that didn't work. Think it needs to be split like you said. Here's the file
    Attached Files Attached Files

  8. #8
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: need vb program to read csv file

    I meant to move the thread if you need coding help.

    Also, have a look at this thread : http://www.vbforums.com/showthread.php?t=236101


    Has someone helped you? Then you can Rate their helpful post.

  9. #9
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: need vb program to read csv file

    I said you can't use SPLIT - that looks for commas and you can have commas in the data itself (like SMITH, JOHN) - right?

    Project Requests is for when you want to pay $$ for someone to solve you problem - thus create a project team.

    If you are looking for help doing this, then Manavo11 should move it to Classic VB forum...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  10. #10
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: need vb program to read csv file

    Quote Originally Posted by manavo11
    I meant to move the thread if you need coding help.

    Also, have a look at this thread : http://www.vbforums.com/showthread.php?t=236101
    Yes - that thread seems like it should do the trick.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Mar 2005
    Posts
    18

    Re: need vb program to read csv file

    If I knew how to write code then I would be looking for help in the vb forum. This is way over my head. I've read 2 books on vb and did some practice examples but nothing like this. I think it should stay here in the project requests. I was ready to keep manually inputing data and forget about this project but now I want to see it complete some how.

  12. #12
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: need vb program to read csv file

    Load it into Access.

Posting Permissions

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



Click Here to Expand Forum to Full Width