This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Import CSV file to KAddressBook with multiple commas

Tags: None
(comma "," separated)
mmasroorali
Registered Member
Posts
4
Karma
0
OS
I am trying to import a CSV file to KAddressBook which has multiple consecutive commas. That means sometimes some fields are empty. While I import this file to KAddressBook, it merges multiple commas and some fields get shifted to the left.

Could you please tell me how can I get rid of this problem?

Thanks in advance.
User avatar
annew
Manager
Posts
1155
Karma
11
OS
Would it be a problem to have a single character, say "." in empty fields? I'd open it in KWrite, then use Edit > Replace to replace ,, with ,., - and save under a slightly different name, then try to import that.

I can't test it on a csv file because the only ones I have are quote-surrounded, but on a quick check with a random character text file with lots of consecutive commas it did seem to work.


annew, proud to be a member of KDE forums since 2008-Oct and a KDE user since 2002.
Join us on http://userbase.kde.org
mmasroorali
Registered Member
Posts
4
Karma
0
OS
annew wrote:Would it be a problem to have a single character, say "." in empty fields? I'd open it in KWrite, then use Edit > Replace to replace ,, with ,., - and save under a slightly different name, then try to import that.

I can't test it on a csv file because the only ones I have are quote-surrounded, but on a quick check with a random character text file with lots of consecutive commas it did seem to work.


Thanks for your reply. But this workaround is not a perfect one. The blank field entries in address book come out to be single dots. This is will not be good when I export a vcf file to my mobile.
mmasroorali
Registered Member
Posts
4
Karma
0
OS
Putting some spaces in empty fields worked. This also did not create any problem when the generated vcf file was imported to mobile phone.
User avatar
annew
Manager
Posts
1155
Karma
11
OS
That's good news. It was my first thought, but I wasn't sure that spaces would be handled correctly in the find and replace. I should have tried it ;D


annew, proud to be a member of KDE forums since 2008-Oct and a KDE user since 2002.
Join us on http://userbase.kde.org
mmasroorali
Registered Member
Posts
4
Karma
0
OS
annew wrote:That's good news. It was my first thought, but I wasn't sure that spaces would be handled correctly in the find and replace. I should have tried it ;D


But your initial idea of putting dots made me to use spaces. I was not sure but it worked. Thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]