Solved

C# text field parser tabs delimited

Posted on 2013-06-11
2
1,189 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 75

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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