Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
robinsgate
 
Posts: n/a
Default Parsing a space delimited file into segments

I have a space delimited file that contains address information. Is there a
way to parse each record so that I parse the records into specific portions
(Company Name is field 1, Street Address is field 2, etc.)? Using the space
as a delimiter doesn't help in this instance because every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
  #2   Report Post  
 
Posts: n/a
Default

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address

information. Is there a
way to parse each record so that I parse the records into

specific portions
(Company Name is field 1, Street Address is field 2,

etc.)? Using the space
as a delimiter doesn't help in this instance because

every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.

  #3   Report Post  
robinsgate
 
Posts: n/a
Default

Thanks for the suggestion, but the file has variable length records, and has
several thousand records. I'd REALLY rather not parse it one record at a
time.

" wrote:

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address

information. Is there a
way to parse each record so that I parse the records into

specific portions
(Company Name is field 1, Street Address is field 2,

etc.)? Using the space
as a delimiter doesn't help in this instance because

every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.


  #4   Report Post  
roadkill
 
Posts: n/a
Default

Is there anything at all distinctive about the format of each record that
would allow (with a smart enough algorithm) for proper separation of fields?

"robinsgate" wrote:

Thanks for the suggestion, but the file has variable length records, and has
several thousand records. I'd REALLY rather not parse it one record at a
time.

" wrote:

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address

information. Is there a
way to parse each record so that I parse the records into

specific portions
(Company Name is field 1, Street Address is field 2,

etc.)? Using the space
as a delimiter doesn't help in this instance because

every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.


  #5   Report Post  
robinsgate
 
Posts: n/a
Default

Only the normal address-related stuff:

* For most records, the occurance of the first numeric value indicates the
end of the company name; there will, of course, be anomalies where the
company name includes numeric values.

* The 2 rightmost capitalized alpha characters indicate the state
abbreviation.

Nothing else stands out other than these 2 characteristics.



"roadkill" wrote:

Is there anything at all distinctive about the format of each record that
would allow (with a smart enough algorithm) for proper separation of fields?

"robinsgate" wrote:

Thanks for the suggestion, but the file has variable length records, and has
several thousand records. I'd REALLY rather not parse it one record at a
time.

" wrote:

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address
information. Is there a
way to parse each record so that I parse the records into
specific portions
(Company Name is field 1, Street Address is field 2,
etc.)? Using the space
as a delimiter doesn't help in this instance because
every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.




  #6   Report Post  
roadkill
 
Posts: n/a
Default

Without some distinct way of determining where fields should start and end it
seems to me that expressing some sort of rule to properly separate fields in
a high percentage of records would be rather complex. And even then, you
probably would have some anomalous records that would get by.

Sorry, but my advise is either do it line by line (manually) or, if you are
sufficiently skilled in macro writing, write a macro that can handle most
situation (looking for numbers, capital letter, etc.) and then go through the
result and fix what's left manually.

I wish I could be more help.

"robinsgate" wrote:

Only the normal address-related stuff:

* For most records, the occurance of the first numeric value indicates the
end of the company name; there will, of course, be anomalies where the
company name includes numeric values.

* The 2 rightmost capitalized alpha characters indicate the state
abbreviation.

Nothing else stands out other than these 2 characteristics.



"roadkill" wrote:

Is there anything at all distinctive about the format of each record that
would allow (with a smart enough algorithm) for proper separation of fields?

"robinsgate" wrote:

Thanks for the suggestion, but the file has variable length records, and has
several thousand records. I'd REALLY rather not parse it one record at a
time.

" wrote:

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address
information. Is there a
way to parse each record so that I parse the records into
specific portions
(Company Name is field 1, Street Address is field 2,
etc.)? Using the space
as a delimiter doesn't help in this instance because
every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.


  #7   Report Post  
robinsgate
 
Posts: n/a
Default

Your response confirms what I've known to this point: there's no easy way of
doing this. But, I appreciate your interest; thanks for trying to help.

"roadkill" wrote:

Without some distinct way of determining where fields should start and end it
seems to me that expressing some sort of rule to properly separate fields in
a high percentage of records would be rather complex. And even then, you
probably would have some anomalous records that would get by.

Sorry, but my advise is either do it line by line (manually) or, if you are
sufficiently skilled in macro writing, write a macro that can handle most
situation (looking for numbers, capital letter, etc.) and then go through the
result and fix what's left manually.

I wish I could be more help.

"robinsgate" wrote:

Only the normal address-related stuff:

* For most records, the occurance of the first numeric value indicates the
end of the company name; there will, of course, be anomalies where the
company name includes numeric values.

* The 2 rightmost capitalized alpha characters indicate the state
abbreviation.

Nothing else stands out other than these 2 characteristics.



"roadkill" wrote:

Is there anything at all distinctive about the format of each record that
would allow (with a smart enough algorithm) for proper separation of fields?

"robinsgate" wrote:

Thanks for the suggestion, but the file has variable length records, and has
several thousand records. I'd REALLY rather not parse it one record at a
time.

" wrote:

hi,
you could use the fixed width option but unless all of the
data is the same width that could cause a serious problem.
i don't know how much data you have but you may have to do
it in groups or 1 line at a time. (yuk)

-----Original Message-----
I have a space delimited file that contains address
information. Is there a
way to parse each record so that I parse the records into
specific portions
(Company Name is field 1, Street Address is field 2,
etc.)? Using the space
as a delimiter doesn't help in this instance because
every word is obviously
separated by a space.

Any help with this would be appreciated.

Thanks.
.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I EDIT AN EXISTING FILE TO BE SPACE DELIMITED? cf Excel Discussion (Misc queries) 1 February 18th 05 05:29 PM
save excel file from a table delimited file (.txt) using macros sedamfo New Users to Excel 1 February 15th 05 04:19 AM
saving excel file as tab delimited Craig Hilliard Excel Discussion (Misc queries) 0 February 1st 05 10:39 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
HELP - I need to change space delimited to comma? Mayer Excel Discussion (Misc queries) 1 December 18th 04 06:21 PM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"