Solved

Tab Delimited export from vb.net

Posted on 2009-05-11
6
431 Views
Last Modified: 2012-05-06
I need to know why my code is not recognizing vbTab when exporting to a file.
logtxt1 = Item0 & vbTab & RTrim(Item1) & vbTab & RTrim(Item2) & vbTab & RTrim(Item3) & vbTab & RTrim(Item4)
            logtxt1 = logtxt1 & vbTab & RTrim(Item5) & vbTab & RTrim(Item6) & vbTab & RTrim(Item7) & vbTab & RTrim(Item8)
            logtxt1 = logtxt1 & vbTab & RTrim(Item9) & vbTab & RTrim(Item10) & vbTab & RTrim(Item11) & vbTab & RTrim(Item12)
            logtxt1 = logtxt1 & vbTab & RTrim(Item13) & vbTab & RTrim(Item14) & vbTab & RTrim(Item15) & vbTab & RTrim(Item16)
            logtxt1 = logtxt1 & vbTab & RTrim(Item17) & vbTab & RTrim(Item18) & vbTab & RTrim(Item19) & vbTab & RTrim(Item20)
            logtxt1 = logtxt1 & vbTab & RTrim(Item21) & vbTab & RTrim(Item22) & vbTab & RTrim(Item23) & vbTab & RTrim(Item24)
            logtxt1 = logtxt1 & vbTab & RTrim(Item25) & vbTab & RTrim(Item26) & vbTab & RTrim(Item27) & vbTab & RTrim(Item28)
            logtxt1 = logtxt1 & vbTab & RTrim(Item29) & vbTab & RTrim(Item30) & vbTab & RTrim(Item31) & vbTab & RTrim(Item32)
            logtxt1 = logtxt1 & vbTab & RTrim(Item33) & vbTab & RTrim(Item34) & vbCrLf
            My.Computer.FileSystem.WriteAllText(Filename, logtxt1, True)

Open in new window

0
Comment
Question by:larrystewart
[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
6 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24359572
Why ? It should work.
0
 
LVL 11

Expert Comment

by:Muhammad Ousama Ghazali
ID: 24359789
Try using Chr(9) instead.
0
 
LVL 11

Expert Comment

by:Muhammad Ousama Ghazali
ID: 24359804
See this link: http://msdn.microsoft.com/en-us/library/f63200h0.aspx

What I understand and had experienced is written there on the above page. The constants are good for Print and Display and may not be good for writing to files so it is always better to use the equivalent provided.
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:larrystewart
ID: 24359805
I have tried chr(9). I need to look further into this.
thx
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 24359890
What are you reading the output file with?...
0
 

Author Closing Comment

by:larrystewart
ID: 31580343
It was what I was using to display my output. The code was working correctl;y. thank you
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 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