?
Solved

Tab Delimited export from vb.net

Posted on 2009-05-11
6
Medium Priority
?
434 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 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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.

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