Alpha Video Training
Results 1 to 9 of 9

Thread: Convert Text file to Data

  1. #1
    Member popellis's Avatar
    Real Name
    Mark Ellis
    Join Date
    Jan 2004
    Location
    Erie,PA
    Posts
    196

    Default Convert Text file to Data

    Anyone have a good way to convert a large text file that is not seperated by tabs or comma's into a data file without going through the whole file manually adding comma's to seperate the data?

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default

    Mark

    You really need to give us more to work on than that.

    There are more alternatives to importing than using a comma.

    How about taking enough of the file to describe what you have and posting it with some instructions so we can help?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member popellis's Avatar
    Real Name
    Mark Ellis
    Join Date
    Jan 2004
    Location
    Erie,PA
    Posts
    196

    Default Convert Text to Data

    Al here is a partial sample
    What i would Like to seperate it into 12 fields

    Number
    FirstName
    Middle
    lastName
    Address1
    address2
    city
    state
    zip
    country
    phone
    fax

    I'm just would like to know if there is an easy way to seperate the data besides manually, I tried Microsoft words find and replace and it will get me so far.
    Thanks for advice.

  4. #4
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default

    think right to left and pick off the phone numbers, zip, city, state

    drop the first few left characters and you are left with a comma separated record with 1 to m names.

    You'll probably need to write it in xbasic...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  5. #5
    Member popellis's Avatar
    Real Name
    Mark Ellis
    Join Date
    Jan 2004
    Location
    Erie,PA
    Posts
    196

    Default

    Thanks Al But I'm a Newbie and don't know Xbasic at all.

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Parsing this file

    I'm not at all sure that even xbasic could handle all that you are asking.

    You don't say what to do with lines that have the number then multiple names, then the address info.

    At least one name, "JohnPerticone" isn't separated into first and last.

    Some names have an appendage "George W. Reilly (BM)," which would have to go somewhere.

    Some lines have the appendage as comma separated data "Mike Anderson, (Asst. BM)"

    At least one line has some sort of semi-colon separator "James C. Gear, PO Box 5040, Cheyenne, WY 82003;"

    At least one line has embedded address info meaning that there are names, address info, more names, more address info and the one I saw also has two voice phone numbers connected via "or" --- "75 -- Harry Kreuser, Scott Redman, Steve Breitlow, 11175 West Parkland Ave., Milwaukee, WI 53224. (414)359-1310 or (888)248-3392. Fax No. (414)359-1323. Louis Pody, 6200 Gisholt Dr., Ste 101, Madison, WI 53713. (608)222-1650. "

    I hope you come up with something or someone else lends a hand but I think the data is too unstructured to lend itself to machine manipulated import.
    Quote Originally Posted by popellis
    Thanks Al But I'm a Newbie and don't know Xbasic at all.

  7. #7
    Member popellis's Avatar
    Real Name
    Mark Ellis
    Join Date
    Jan 2004
    Location
    Erie,PA
    Posts
    196

    Default

    Thanks Stan I just thought I would ask, and maybe there was something out there that would help I didn't put the data together I'm the lucky one who gets to try to make it usefull.
    I guess I will have to do it manually

    Thanks All

  8. #8
    Member
    Real Name
    John Hurren
    Join Date
    Jan 2006
    Posts
    8

    Default

    Howdy,

    I a newbie also so what I would do is Import the Tab Separated Data into Excel and re-arrange the fields (Columns) in Excel to the desired order then export from Excel into a CSV format.

    Could this work for you?

    John

  9. #9
    "Certified" Alphaholic
    Real Name
    JohnZaleski
    Join Date
    Oct 2000
    Posts
    1,736

    Default

    There is a very nice piece of software called "Monarch"thatallows one to take a flat text file and converrt it into different formats. They refer to it as data mining software.It's very easy to use and is continually improved.The most common usage of it is to take reports outputted to text files and convert to easily importable formats like ascii delimited.

Similar Threads

  1. Import text file
    By jarty67 in forum Alpha Five Version 6
    Replies: 5
    Last Post: 11-10-2004, 05:44 PM
  2. Saving Report as text file or excel file
    By Michael Hadjimichael in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-02-2004, 05:46 AM
  3. printing to text file
    By Joe Wheat in forum Alpha Five Version 4
    Replies: 1
    Last Post: 12-23-2002, 02:28 PM
  4. data from two lines of text
    By Ken Whitcomb in forum Alpha Five Version 5
    Replies: 1
    Last Post: 10-28-2002, 11:34 AM
  5. Import data from Text File to existing DBF
    By Don Patterson in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 02-07-2002, 06:41 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
  •