Click to See Complete Forum and Search --> : need vb program to read csv file
exactajack
Apr 8th, 2005, 10:58 PM
I have a comma delimited data file and I want to make a program to read and display the data in a specific format.
manavo11
Apr 9th, 2005, 04:30 PM
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.
szlamany
Apr 9th, 2005, 04:48 PM
Not 100% sure - but I think I've seen people post that they can read a CSV file with ADO - search the forum.
manavo11
Apr 9th, 2005, 04:55 PM
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? :ehh:
exactajack
Apr 9th, 2005, 05:01 PM
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.
szlamany
Apr 9th, 2005, 05:05 PM
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.php?t=311178&highlight=csv+ado
exactajack
Apr 9th, 2005, 05:05 PM
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
manavo11
Apr 9th, 2005, 05:11 PM
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
szlamany
Apr 9th, 2005, 05:12 PM
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...
szlamany
Apr 9th, 2005, 05:23 PM
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.
exactajack
Apr 9th, 2005, 09:35 PM
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.
dglienna
Apr 15th, 2005, 05:02 PM
Load it into Access.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.