Converting a DAT to CSV with TextPad

Follow

DAT files can be manually converted to the CSV format by simply replacing the delimiters with a program like TextPad.  So, first open your .dat file with TextPad.

The values in your original .dat file are separated by the symbols þþ (thorn, □ (ASCII 20), and another thorn).  So, your coding values look like this:

þBEGPRODþ□þENDPRODþ□þBEGPROD_ATTþ□þENDPROD_ATTþ□þCustodianþ


Using the functions in Text Pad, you can do a find-replace (F8) on these characters. Use the following sequence:

  1. Find-replace all " (quote) with "" (double quote). This will ensure that your line breaks remain consistent.
  2. Find-replace all þ (thorn) with (quote)
  3. Find-replace all  □ (ASCII 20) with , (comma)
    This will result in all values being now separated by "," (quote comma quote):
    "BEGPROD","ENDPROD","BEGPROD_ATT","ENDPROD_ATT","Custodian"
  4.  Save file as: nextpoint_load_file.csv.
  5. Open the new .csv file in Excel. Your values will be separated into columns (based on the new comma-quote positions).

Now, you can modify the column headers to match the coding that Nextpoint uses.

Troubleshooting: "My find-replace is not working correctly."

Some clients have had trouble in the past with certain characters being unexplainably replaced during this process, thus altering the desired results of their ending CSV (e.g. "" replacing the character sequence of "th" ).  If you notice nuances in your resulting CSV, some users have found Sublime Text to be a helpful text editor alternative.

2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.