|
-
Nov 7th, 2016, 12:58 PM
#1
Thread Starter
Junior Member
Loading a Csv
Dear all.
Yesterday 4x2y very kindly gave me a solution to saving to and load from a csv.txt file
The save worked well, I can now easily save numerous textbox.text(s) with easy code. Thanks 4x2y
The code:-
Bla Bla
Dim SWriter As StreamWriter = New StreamWriter(SaveFileDialog.FileName)
SWriter.Write(TxtBx1.Text & ",")
SWriter.Write(TxtBx2.Text)
SWriter.Close()
The open though was not so easy when extended to many textbox. text loads (fills)
Bla Bla
Dim SReader As StreamReader = New StreamReader(OpenFileDialog.FileName)
Dim r() As String = SReader.ReadToEnd.Split(",")
TxtBx1.Text = r(0)
TxtBx2.Text = r(1)
SReader.Close()
This load solution works, BUT it is going to be difficult to manage when one has say 1000 pieces separated by "," of information to reads from the csv.txt file.
Would be great to see another load solution that is easier to manage, i.e does not require an incrementing variable like r in this code.
Would be fantastic to see the code / syntax of this.
Thanks.
Donovan
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|