i am using VB.NET 2003 and i need to read some data from a cvs file and store it into a two dimensional array.... i couldn't find an example anywhere.. pls help :'(
tripes
-1
Newbie Poster
Recommended Answers
Jump to PostSee How to read csv file contents in VB.Net. It reads a csv file lines in to an array. There's comment at the end, how to get (comma) separate values from one line. Use the code in that thread and add a second loop to split lines and finally …
Jump to PostPublic Class FormStart Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim readText() As String = System.IO.File.ReadAllLines("C:\file.txt") Dim s As String For Each s In readText Dim columns() As String = s.Split(New [Char]() {","c}) System.Diagnostics.Debugger.Break() Next End Sub End Class
All 7 Replies
Teme64
215
Veteran Poster
sknake
1,622
Senior Poster
Featured Poster
Teme64
215
Veteran Poster
tripes
-1
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
sknake
1,622
Senior Poster
Featured Poster
Teme64
215
Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.