+ Reply to Thread
Results 1 to 4 of 4

Get Data From Text File And Convert To Excel File

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Get Data From Text File And Convert To Excel File

    Hi Everybody...

    I'm really need your expertise in Excel and VB Script.

    I have a data in .txt file and try to export to excel file. The data in .txt file looks like below:

    ============================================================================

    User John Marshall
    Designation Senior Operation Manager
    Desktop Yes
    Laptop No
    Desktop Model Dell Optiplex GX280
    Laptop Model N/A
    Contact Number
    Fixed Line +60342910606
    Mobile +60122323456
    Remarks User currently attending training from 21st May 2011 to 22nd June 2012.
    !
    User Chan Liu Fan
    Designation HR Manager
    Desktop Yes
    Laptop No
    Desktop Model Dell Optiplex GX280
    Laptop Model N/A
    Contact Number
    Fixed Line +60342910610
    Mobile +60122347471
    Remarks User is active
    !
    User Ahmad Fahmi Bin Alwi
    Designation Operation Supervisor
    Desktop No
    Laptop Yes
    Desktop Model N/A
    Laptop Model IBM Lenovo ThinkPad L412
    Contact Number
    Fixed Line +60342910616
    Mobile +60123431010
    Remarks User is active

    ..........
    !
    !
    User Access-Right Access-to-all-Site Access-to-HQ

    John Marshall Full Yes Yes
    Chan Liu Fan Limited No Yes
    Ahmad Fahmi Bin Alwi Limited Yes (Limited) Yes

    ........
    !

    ============================================================================


    Now i try to export some of the data in this .txt to excel file. And that excel file should be looks like below:

    User Datails.xlsx

    Anyway, I'm very new in Excel and VB Scripting.

  2. #2
    Registered User
    Join Date
    11-23-2011
    Location
    VietNam
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Get Data From Text File And Convert To Excel File

    Can You upload text file? I think We can get VBScript.RegExp to solve this case

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Get Data From Text File And Convert To Excel File

    Hi nmhung49,

    Here's that .txt file:

    test.txt

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Get Data From Text File And Convert To Excel File

    hi nuriez1906, option to make it, please check xls attachment file, run code "test", select txt file to process

    PS. txt file is the one it was tested on
    Attached Files Attached Files
    Last edited by watersev; 02-29-2012 at 11:31 AM.

+ 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