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 PostThe OP wanted csv file to a matrix. Here's sknake's code slightly modified
Dim Matrix(,) As String Dim readText() As String = System.IO.File.ReadAllLines("C:\file.txt") ' Redim matrix ReDim Matrix(readText.GetUpperBound(0), Strings.Split(readText(0), ",").GetUpperBound(0)) Dim s As String Dim Line As Integer = 0 Dim j As Integer For Each s …
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.