Advertisement

05.12.2004 at 10:04AM PDT, ID: 20987040
[x]
Attachment Details

Reading CSV file using Visual Studio (VB.net)

Asked by phil_hearn in Microsoft Visual Basic.Net

Tags: , ,

I am new to Visual Studio and more experienced with VBA.

Let's say I have a file called test.csv in c:\myfiles which has 3 lines

1,antelope,55
2,bear,44
3,cat,33

How can I open this file as read only and then, say, display in a msgbox the word "bear" as the second item in row 2. I believe I should be using ADO to do this, but need some help to get it working

It should be noted that some of the .csv file I wish to open for real can be quite big files (say, up to 10000 lines)

Thanks
PhilStart Free Trial
 
Loading Advertisement...
 
[+][-]05.12.2004 at 10:15AM PDT, ID: 11052025

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.12.2004 at 12:10PM PDT, ID: 11052991

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.12.2004 at 12:12PM PDT, ID: 11053011

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: file, read, csv
Sign Up Now!
Solution Provided By: tgannetts
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.12.2004 at 01:45PM PDT, ID: 11053780

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2004 at 02:14AM PDT, ID: 11057345

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32