Solved

Tab Delimited export from vb.net

Posted on 2009-05-11
6
426 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
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

19 Experts available now in Live!

Get 1:1 Help Now