|
-
Jul 19th, 2008, 11:19 AM
#5
Re: [2008] Editing CSV File
Weren't you using ADO.NET to read this CSV file in some other thread? Anyway, ReadAllText is the wrong way to read this file. It will just give you the whole file contents as a single string, which is useless. You need each individual field value so you'd have to break that string up into lines anyway, then each of those lines into fields. There's no point doing that when there's ways to read the file that will do that for you. As I said, ADO.NET can populate a DataTable for you. Alternatively you can use a TextFieldParser to read the file line by line, field by field.
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
|