Can a CSV file created without a delimiting character be "fixed" ?

M

Mike Iacovou

I have been given an extensive CSV file which has been created without a delimiting character !!! Thus, instead of records in columns in each row, each rows data is merged as a single entry. Unfortunately, the data sets are not applicatble to a "fixed width" method...
Any ideas. Many thanks.
 
H

Harlan Grove

I have been given an extensive CSV file which has been created without a
delimiting character !!! Thus, instead of records in columns in each row,
each rows data is merged as a single entry. Unfortunately, the data sets
are not applicatble to a "fixed width" method...
Any ideas. Many thanks.

Unless there's some globally applicable rules to use to determine the boundaries
between fields, you're out of luck.

It's possible some rules could be inferred, but it's impossible to say for sure
without seeing a sample of the data. If the data is sensitive, replace the
letters in names with Xs and the digits in numbers with all 9s (but leave the
same number of digits!). Also leave generic, nonidentifying words as-is, e.g.,
change 'Dr Joe Blow' to 'Dr XXX XXXX' and '123 Maple Ave.' to '999 XXXXX Ave.'
So select a sample of records, make these partial obscuring changes, and post
the resulting sample records along with how you'd expect them to be broken apart
into fields. For example,

sample record:
Ms XXXXX XXXXXXX 999 XXXXXXXX Rd XXXXXXXXXX XX 99999 999-999-9999 9999.99

fields:
Ms XXXXX XXXXXXX
999 XXXXXXXX Rd
XXXXXXXXXX XX 99999
999-999-9999
9999.99

Without live samples to examine, you're on your own.
 
A

AlfD

Hi!

1. The CS in CSV stands for comma-separated : which, sadly, your dat
clearly is not.

2. Unless there is some "form" to the data items, then you are probabl
going to be dependent on some sort of "intuition" which you apply fro
your knowledge of how the data should look.

3. Some bits of that intuition might be codifiable.

4. If you'd like to share a representative sample, I'd be glad to se
what I could see....

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top