Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    eleiminate ' (2000 sr 1)

    is possible to read in to a txt file and delete the " in init and anding lines the charachter " ...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: eleiminate ' (2000 sr 1)

    If you want to open the file in Excel, you van use

    Workbooks.OpenText Filename:="C:...VERSAMENTI.TXT", _
    Origin:=xlMSDOS, DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, FieldInfo:=Array(1, 1)

    If you want to process the file line by line, you can use code like this:

    Dim f As Integer, s As String
    f = FreeFile
    Open "C:...VERSAMENTI.TXT" For Input As #f
    Do While Not EOF(f)
    Input #f, s
    ' code to process variable goes here
    Loop
    Close #f

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: eleiminate ' (2000 sr 1)

    Hans, the first option not is a good idea because when i past the txt file in the sheet the " not is show (boh?)

    Ths next option is good but the lenght of line is valiable and not costant....

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: eleiminate ' (2000 sr 1)

    I thought you wanted to get rid of the quotes.

    What is the problem with the line being variable in length?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •