+ Reply to Thread
Results 1 to 3 of 3

Automatic conversion from .txt files to excel files in specific format

  1. #1
    Registered User
    Join Date
    11-18-2009
    Location
    los angeles, california
    MS-Off Ver
    Excel 2000
    Posts
    14

    Automatic conversion from .txt files to excel files in specific format

    Good morning,
    I have a report in .txt format that I'd like to convert it to excel automatically. However, when it becomes excel, I need the excel to be in specific format. I've attached the .txt file and the excel file in the format that I want. Please help with the followings:

    1) In column A, I need sheet 1, sheet 2, sheet 3 to vary. For example: in the attached file, sheet 1 is from 20+00 to 20+50, sheet 2 is from 20+75 to 21+50, and sheet 3 is from 21+75 to 22+25. However some other situation sheet 1 will be 20+00 to 20+75, sheet 2 will be from 21+00 to 21+25, and sheet 3 will be from 21+50 to 22+25,......

    2)In column B, I need to convert text such as: 20+00, 20+25, 20+50,... to numbers so I can include them in my calculations. At the same time, however, I'd like to keep those numbers in the same format as: 20+00, 20+25, 20+50,....

    Thank you for your time.
    Nguyen
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Automatic conversion from .txt files to excel files in specific format

    Some clarification would help:

    In Excel a "sheet" is a new tab but on your sample spreadsheet you show a "sheet" as a group of rows. Do you mean a group of rows as per your example?

    You state that the row groupings will change : how will the row groupings be identified?

    In your sample spreadsheet columns C to G are presumably populated from the text file. Which values go into which columns?

    My guess is that this should be a three stage process :
    - the first to import the text file to a temporary area
    - then you identify the row groupings
    - then the data is reformatted into the appropriate format


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Registered User
    Join Date
    11-18-2009
    Location
    los angeles, california
    MS-Off Ver
    Excel 2000
    Posts
    14

    Re: Automatic conversion from .txt files to excel files in specific format

    Quote Originally Posted by tony h View Post
    Some clarification would help:

    In Excel a "sheet" is a new tab but on your sample spreadsheet you show a "sheet" as a group of rows. Do you mean a group of rows as per your example?

    You state that the row groupings will change : how will the row groupings be identified?

    In your sample spreadsheet columns C to G are presumably populated from the text file. Which values go into which columns?

    My guess is that this should be a three stage process :
    - the first to import the text file to a temporary area
    - then you identify the row groupings
    - then the data is reformatted into the appropriate format
    Hello Tony,
    Yes, in my spreadsheet, "sheet" is a group of rows. I don't know how the grouping will change, though because every report (.txt files) will be different.
    As for the other clarification, columns C, F, & G are formulated. Only columns D & E are values that need to be imported from the .txt file. If you look at the text file, you see that "excav" and "embank" have some kind of values. These are the values that will go under columns D & E.
    Sorry for the confusion.
    Nguyen

+ 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