+ Reply to Thread
Results 1 to 2 of 2

Read Tab delimited file breaks at commas

  1. #1
    Registered User
    Join Date
    09-29-2011
    Location
    Sweden
    MS-Off Ver
    Excel 2003-2010
    Posts
    2

    Read Tab delimited file breaks at commas

    Hi
    I'm having problems with a Tab delimited file. I read it, but Input# puts in a linebreake when there is a comma in the text.
    [code]

    fileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")

    If fileToOpen <> False Then
    Dim rowString As String

    FileName = fileToOpen
    Open FileName For Input As #1
    Do While (Not EOF(1))

    ' Read the file one line at the time
    Input #1, rowString

    Loop
    Close #1
    End If
    [stop code]

    examaple of the file:
    New York -> USD -> 10 000
    Stockholm -> SEK -> 9 100,5

    The result:
    New York -> USD -> 10 000
    Stockholm -> SEK -> 9 100
    5


    Can anyone help me with this problem.

  2. #2
    Registered User
    Join Date
    09-29-2011
    Location
    Sweden
    MS-Off Ver
    Excel 2003-2010
    Posts
    2

    Thumbs up Re: Read Tab delimited file breaks at commas

    I found the solution.

    insted of:
    Input #1, rowString

    I used:
    Line Input #1, rowString

    and it worked.

    Thank you anyway, hope this could help some one else in my position

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1