+ Reply to Thread
Results 1 to 5 of 5

Problem with import of txt file

  1. #1
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2021
    Posts
    351

    Problem with import of txt file

    I have got this code, but when I run it it does not work. The problem can be I use Fixed width, when I import the file
    Gives error on

    Please Login or Register  to view this content.
    All I need is to import the file to where I need it.

    Please Login or Register  to view this content.
    I do have cross links for this.

    https://www.mrexcel.com/forum/excel-...ml#post4870883
    http://www.ozgrid.com/forum/showthre...goto=newpost**
    https://www.excelguru.ca/forums/show...rt-of-txt-file
    Last edited by hendrikbez; 07-19-2017 at 05:13 AM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Problem with import of txt file

    Hello
    Can you post the text file sample ... ?
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2021
    Posts
    351

    Re: Problem with import of txt file

    Here is the text file
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2021
    Posts
    351

    Re: Problem with import of txt file

    looks like no one can help me with this at all.
    any idea to do this

  5. #5
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Problem with import of txt file

    As you mention yourself, the file uses fixed width fields but the code you posted is for a file where the fields are separated with a delimiter -
    Please Login or Register  to view this content.
    You can get basic code to import a Fixed Width file by using the macro recorder and then manually importing a file. Alternatively there are plenty of code samples to import FW files available with a simple search.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with using VBA to import comma separated text file to worksheet - Excel 2013
    By tommagpieconsultants in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2015, 04:57 AM
  2. File import - select file and import sheet(1) from closed workbook
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 03:15 AM
  3. import file from another sheet - location problem
    By j_r_m_c in forum Excel General
    Replies: 1
    Last Post: 02-19-2011, 03:38 PM
  4. import file problem
    By naaitie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2007, 04:42 PM
  5. Text Import Wizard: File Origin Problem
    By Baldbloke in forum Excel General
    Replies: 0
    Last Post: 03-29-2006, 09:55 AM
  6. [SOLVED] Import text file problem
    By condotta@shaw.ca in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2005, 12:45 PM
  7. [SOLVED] problem import text file
    By Lynn in forum Excel General
    Replies: 1
    Last Post: 10-02-2005, 06:05 AM

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