+ Reply to Thread
Results 1 to 6 of 6

Convert txt to Excel files

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Convert txt to Excel files

    Hi Friends,
    I was wondering if somebody can please help me out with a vba code that will convert all the txt files to seperate excel file by importing the data seperated by delimited (|) in a folder. For example if there are 20 seperate txt/csv file in a folder, i would like to have 20 seperate excel files in the same folder.It will be great if somebody can please help me out.
    Kind regards,me

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Convert txt to Excel files

    Post a sample txt/csv file.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Convert txt to Excel files

    Hi, The files are all different in it's content. But the dilimited parameter is same that is "|" in all the files. However it looks like this.

    USERNAME |PASSWORD |USER_ID |ACCOUNT_STATUS |LOCK_DATE |EXPIRY_DATE |DEFAULT_TABLESPACE |TEMPORARY_TABLESPACE |CREATED |PROFILE |EXTERNAL_NAME
    SYS |DB Password| 0|OPEN | | |SYSTEM |TEMPORARY |2005/10/04 12:43:51|SECPROFILE |
    SYSTEM |DB Password| 5|OPEN

    thanks and regards,me

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Convert txt to Excel files

    I guess i already have something done on this line. Let me check !

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Convert txt to Excel files

    Hi, fatacore,

    maybe like this:
    Please Login or Register  to view this content.
    Please note that the text files will get moved to a subfolder in the given Drive and Folder - you would need to adjust that as well ior comment that out.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Convert txt to Excel files

    Attached is my solution. Hope this helps.

+ 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. Convert Multiple text files to excel files
    By shanmugapriya.a in forum Excel General
    Replies: 3
    Last Post: 07-07-2015, 10:39 AM
  2. Replies: 5
    Last Post: 11-19-2013, 04:11 PM
  3. [SOLVED] Can I convert my Quatro Pro files to MS Excel files?
    By James HW in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-11-2006, 11:45 AM
  4. How do I convert .dbf files to Excel
    By Lravey in forum Excel General
    Replies: 0
    Last Post: 05-02-2005, 09:45 PM
  5. How do I convert PDF files to Excel?
    By Kusko in forum Excel General
    Replies: 4
    Last Post: 03-25-2005, 01:21 PM

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