+ Reply to Thread
Results 1 to 4 of 4

Copy data from a text file

  1. #1
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Copy data from a text file

    I have a macro that i use a shell command to run a batch file . the batch file produces a file
    named table.txt Here is my question, can the macro open that text file after it has been created , copy all the data and then paste into say cell F5 of my Worksheet . below is sample table.txt file. i found a macro that would open a source file and then append to a new . txt file, but i need it to copy and paste the data into my excel sheet. Thanks for any help they may be offered.


    table.txt

    10.10.100.123 SHARED
    10.10.100.124 NOT SHARED
    10.10.100.125 SHARED
    10.10.100.126 NOT SHARED
    10.10.100.127 SHARED
    10.10.100.128 NOT SHARED
    Last edited by Traymond; 02-24-2011 at 09:10 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy data from a text file

    Something like help?
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 02-24-2011 at 09:12 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Copy data from a text file

    Bam !!!! that is perfect.... Thanks Jerry

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy data from a text file

    Slight edit above to ensure the data always goes into a single column.

+ 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