[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C# text field parser tabs delimited

Posted on 2013-06-11
2
Medium Priority
?
1,589 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
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!
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

649 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