#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2006
    Posts
    24
    Rep Power
    0

    Macro to import .txt to xls urgent


    hi
    can any one there help me with a critical issue .
    IWANT to import these .txt to xls through MACROS
    i have TWO text file IN C:\BANK\DATA\att.txt AND .XLS IS IN C:\BANK\IMPORTTEXT\BANK.xls

    1. att.txt
    data is like this==
    644 Records, Jan 6 2007 1:21AM
    33 Records, Jan 5 2007 11:01AM
    60 Records, Dec 20 2004 9:39AM

    No Data
    No Data

    2.btt.txt
    data is like this==
    644 Records, Jan 6 2007 1:21AM
    No Data
    60 Records, Dec 20 2004 9:39AM

    No Data
    60 Records, Dec 20 2004 9:39AM

    iam now manullay coping the data from .txt to xls att in one column ie:A and btt to B column next att to C and btt to D and next att to E and btt to F so on...
    is there any way i came automate this through
    thanxs
    its urgent pls
  2. #2
  3. Type Cast Exception
    Devshed Supreme Being (6500+ posts)

    Join Date
    Apr 2004
    Location
    OAKLAND CA | Adam's Point (Fairyland)
    Posts
    14,954
    Rep Power
    8617
    You know you can open the text file in Excel, the wizard will import it for you on any delimiter ;-)

    I understand you are wanting to merge them somehow, but I'm unclear on your keys or anything else. But I'm probably too late anyway ... seeing the urgency.

    Have you thought about firing up Access or another database, importing them, and combining them on a query with a key? Should take about 1 minute to do all that and export it back to Excel. I need to do this regularly and it's a lot easier and more efficient than trying to write a bloated macro to do the same.
    Last edited by medialint; January 11th, 2007 at 07:11 PM.
    medialint.com

    “Today you are You, that is truer than true. There is no one alive who is Youer than You.” - Dr. Seuss
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2006
    Posts
    24
    Rep Power
    0
    hi
    is there any way i can import data from that .txt to .xls through programming each time it has to load to diff column say A,B,C,D THEN NEXT TIME E,F,G,H NEXT I,J,K,L
    AND so on
    thanxs

IMN logo majestic logo threadwatch logo seochat tools logo