Merge two .dat file after matching first column row
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-08-21 11:19 AM
Hi Community,
I am trying to merge two .dat files after comparing that the first row has the same columns. Syntax for the .dat file is as below(when I open with notepad)
Project ID Employee ID Project Type
XXXX xxxxxxxxxxx xx
1 ) First I need to check if the column matches in both files
2) After that I need to append the content of second file to first file after removing the header
I thought of renaming .dat with .csv file,Append the records,save and rename back to .dat. but there were two problems :-
1 ) Headers are in japanese. When i change extension to .csv , japanese characters are getting replaced with some other weird character.
2) When I append data to csv and rename back to .dat, " is added before the line and after the line as below
"Project ID Employee ID Project Type"
"XXXX xxxxxxxxxxx xx"
Could someone please suggest how to proceed ?
------------------------------
Kirtish Trivedi
------------------------------
I am trying to merge two .dat files after comparing that the first row has the same columns. Syntax for the .dat file is as below(when I open with notepad)
Project ID Employee ID Project Type
XXXX xxxxxxxxxxx xx
1 ) First I need to check if the column matches in both files
2) After that I need to append the content of second file to first file after removing the header
I thought of renaming .dat with .csv file,Append the records,save and rename back to .dat. but there were two problems :-
1 ) Headers are in japanese. When i change extension to .csv , japanese characters are getting replaced with some other weird character.
2) When I append data to csv and rename back to .dat, " is added before the line and after the line as below
"Project ID Employee ID Project Type"
"XXXX xxxxxxxxxxx xx"
Could someone please suggest how to proceed ?
------------------------------
Kirtish Trivedi
------------------------------
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-08-21 02:35 AM
Hello Kritish,
Can I suggest that when you try to save your .dat file as a csv, you change the Encoding default option and select "UTF-8 with BOM" instead and then try?

------------------------------
Harpreet Kaur Product Consultant
------------------------------
Can I suggest that when you try to save your .dat file as a csv, you change the Encoding default option and select "UTF-8 with BOM" instead and then try?
------------------------------
Harpreet Kaur Product Consultant
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-08-21 05:02 AM
Thank you @HarpreetKaur for suggestion , but I went with the solution mentioned by @AndreyKudinov here
https://community.blueprism.com/communities/community-home/digestviewer/viewthread?MessageKey=419da3f9-e017-4493-9907-cde1472f6c98&CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&tab=digestviewer#bm...
------------------------------
Kirtish Trivedi
------------------------------
https://community.blueprism.com/communities/community-home/digestviewer/viewthread?MessageKey=419da3f9-e017-4493-9907-cde1472f6c98&CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01&tab=digestviewer#bm...
------------------------------
Kirtish Trivedi
------------------------------
