Solved

Tab Delimited export from vb.net

Posted on 2009-05-11
6
432 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

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

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…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 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