How to change poorly formatted text into a usable database.
June 22, 2006 7:52 AM
I have a directory which is swell for printing, but I need it in a database.
The directory has regular information (name, address, city state zip, phone, fax, contact person, special codes) and in the text file there is a hard break after each item (name, address, city state zip, phone, fax, contact person) and an extra line break between entries. I can replace the hard breaks by hand (over 1k entries with 6+ items each), or the hive mind can show the smart way.
The directory has regular information (name, address, city state zip, phone, fax, contact person, special codes) and in the text file there is a hard break after each item (name, address, city state zip, phone, fax, contact person) and an extra line break between entries. I can replace the hard breaks by hand (over 1k entries with 6+ items each), or the hive mind can show the smart way.
Or (duh) replace "^p" with "^t", then replace "^t^t" with "^p". All this presumes that there are no tabs in the document to begin with, which you should verify.
posted by deadfather at 8:20 AM on June 22, 2006
posted by deadfather at 8:20 AM on June 22, 2006
That is exactly what I was looking for, I didn't know about ^p and ^t. Thanks
posted by Classic Diner at 8:28 AM on June 22, 2006
posted by Classic Diner at 8:28 AM on June 22, 2006
« Older How to find a manufacturer in the UK | Please help me teach myself to use electrical... Newer »
This thread is closed to new comments.
If you open in MS Word, replace "^p^p" (two hard returns) with "##$$%%" (i.e., nonsense that is not naturally occurring). Then replace "^p" with "^t" (tab). Then replace "##$$%%" with "^p". Save as text, and import.
posted by deadfather at 8:16 AM on June 22, 2006