Solved

C# text field parser tabs delimited

Posted on 2013-06-11
2
1,097 Views
Last Modified: 2013-06-11
I have a text file that is tab delimited. I have been using this code to read comma delimited files. What is the correct syntax to change this to tab delimited?

// Set up the Delimiters used in the file
tfp.Delimiters = new string[] { "," };
// True if data fields can be in double quotes
tfp.HasFieldsEnclosedInQuotes = true;
// This means that it is a delimited and NOT a fix width file
tfp.TextFieldType = FieldType.Delimited;
// Remove white spaces from begining and ending of each field
tfp.TrimWhiteSpace = true;
0
Comment
Question by:rwheeler23
2 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39239813
tfp.Delimiters = new string[] { "\t" };

Open in new window

0
 

Author Closing Comment

by:rwheeler23
ID: 39239817
Thank you. I have been hunting for that all day.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now