BASCHDI

BASCHDI

  • NA
  • 9
  • 4.5k

.csv to Windows .contact Files (xml)

Apr 23 2013 5:22 AM
Hello,

Look, i have a .csv export lookin like this,

Name1;Telefax
"Name1";"12345 / 442346"
"Name2";"12345 / 245245"
"Name3";"12345 -652609"
"Name4";"12345 -5682"

I wanna convert this .csv Export file, to single .contact File for every Line, u see there upper.

At the end the Contacts must look like this in the Output Folder:

Name1.contact
Name2.contact


Name1.contact should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<c:contact c:Version="1" xmlns:c="http://schemas.microsoft.com/Contact" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:MSP2P="http://schemas.microsoft.com/Contact/Extended/MSP2P">
    <c:CreationDate>2013-04-23T07:40:42Z</c:CreationDate><c:Extended xsi:nil="true"/>
    <c:ContactIDCollection><c:ContactID c:ElementID="038a7d74-0ef3-4b8f-afb1-cce28f1022d8"><c:Value>4696b858-6391-4498-92b6-9a7cb25fe720</c:Value></c:ContactID></c:ContactIDCollection><c:NameCollection><c:Name c:ElementID="5b3d8df0-a1e7-44fe-91e0-ae5658614cd0"><c:FormattedName>Name1</c:FormattedName><c:GivenName>Name1</c:GivenName></c:Name></c:NameCollection><c:PhoneNumberCollection><c:PhoneNumber c:ElementID="e0b8e9fd-16dc-4c40-aa23-b784fd21391b"><c:Number>005524 942523</c:Number><c:LabelCollection><c:Label>Fax</c:Label><c:Label>Business</c:Label></c:LabelCollection></c:PhoneNumber></c:PhoneNumberCollection><c:PhotoCollection><c:Photo c:ElementID="ceeb3166-cd14-4a0c-a3b3-1c0a8c67128d"><c:LabelCollection><c:Label>UserTile</c:Label></c:LabelCollection></c:Photo></c:PhotoCollection></c:contact>

I need to put the String of Name1 & Telefax Column in the right coloumns of every .contact file, thats get generated.

Could anyone help me. Lookin there @ vulpes :>

greetings!