DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Posts
    15

    TAB DELIMITED output

    Hi,
    I am using "Print" statement to create text file. I want it to be TAB delimited. Can anyone give sample code for this ?

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Posts
    133
    This is a possibility:

    Code:
    Dim strField        As String
        Open "c:\tmp\test.txt" For Output As #1
        
        strField = "test1" & vbTab & "Description" & vbTab & "Number"
        Print #1, strField
        strField = "test2" & vbTab & "Description" & vbTab & "Number"
        Print #1, strField
        strField = "test3" & vbTab & "Description" & vbTab & "Number"
        Print #1, strField
        strField = "test4" & vbTab & "Description" & vbTab & "Number"
        Print #1, strField
        Close #1
    Benjamin

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Print #hFile, "column 1"; vbTab; "column 2"; vbTab; "column 3"
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 0
    Last Post: 11-28-2005, 12:56 PM
  2. Crystal Reports and tab delimited file
    By nemcruncher in forum .NET
    Replies: 1
    Last Post: 08-15-2005, 08:53 AM
  3. Tab Delimited text file problem
    By nanban4u in forum VB Classic
    Replies: 2
    Last Post: 08-12-2005, 08:49 PM
  4. Tab delimited files
    By Hans-Arne Sandem in forum .NET
    Replies: 1
    Last Post: 01-05-2002, 12:19 PM
  5. Replies: 1
    Last Post: 03-14-2000, 12:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links