?
Solved

C# text field parser tabs delimited

Posted on 2013-06-11
2
Medium Priority
?
1,487 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 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