DAT files can be manually converted to the CSV format by simply replacing the delimiters. There are various programs you can use for this, but we generally recommend Sublime Text. So, first open your .dat file with Sublime Text.
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 Sublime Text, you can do a find-replace on these characters. Use the following sequence:
- Find-replace all " (quote) with "" (double quote). This will ensure that your line breaks remain consistent.
- Find-replace all þ (thorn) with " (quote)
- 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" - Save file as: nextpoint_load_file.csv.
- 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.
Please Note: If your .dat file is in UTF-16 format, you must convert it to UTF-8. You can do this is in sublime text by selecting File/Save with Encoding.
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.
Comments
Please sign in to leave a comment.