+ Reply to Thread
Results 1 to 6 of 6

automating the import of a text file using fixed space delimiters

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question automating the import of a text file using fixed space delimiters

    This is actually step 1 of a 2 step process but I will start a new thread for the next step and link if possible.

    Currently I am dumping data from an AIX system flat file into a text file (*.prt). I'm able to successfully import the data manually using a fixed space delimited import method but too novice to set this up automatically. I imagine I'll set up a task to trigger a process for excel 2007 to open my excel workbook. Is there a way I can automate a macro to run each time this workbook file is opened? It should import the *.prt text based file using fixed space delimiters with spaces occurring at 3,18,30,53,64,75,76,79, & 84
    The file will also be imported from a samba share but the drive is mapped locally.

    Any help would be wonderful!
    Thanks in advance

    Seth

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: automating the import of a text file using fixed space delimiters

    I suggest you post a sample file for people to test with.

    TIM

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Lightbulb Re: automating the import of a text file using fixed space delimiters

    I've taken some screenshots, in attached word doc, of what I do manually as to give some ideas how to automate this process.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: automating the import of a text file using fixed space delimiters

    OK, that's what you want to do. Could you upload something to do it to ...

  5. #5
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: automating the import of a text file using fixed space delimiters

    In the absence of anything else, I have created a small text file.

    You can record a macro while you import the text file and it will look something like this. I've edited it a little, and you can probably remove most, if not all, of the default values.

    Please Login or Register  to view this content.

    For example, this is cut down but does the same thing.

    Please Login or Register  to view this content.

    In either case, change "...username..." to *your* user name. Adjust the path name, as required.

    TIM

  6. #6
    Registered User
    Join Date
    05-09-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: automating the import of a text file using fixed space delimiters

    Thanks for the reply Tim. I'm experimenting with the recorded macro. I'm going to try recording one myself just to see if they look about the same. I appreciate the help and I'll let you know if I get what I'm after.

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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