FoxPro Programming
DBF to VCF (contacts)
Gravatar is a globally recognized avatar based on your email address. DBF to VCF (contacts)
  Harvey Mushman
  All
  Jun 28, 2022 @ 10:30am

Anybody ever converted a DBF or CSV file to VCF format?

Where VCF (Virtual Card or vCard Format) which is the mobile device file format standard for importing contacts.

Source code would be very time saving.

Thanks in advance!

Gravatar is a globally recognized avatar based on your email address. re: DBF to VCF (contacts)
  Rick Strahl
  Harvey Mushman
  Jun 28, 2022 @ 06:17pm

VCards are just text files and they are pretty easy to generate. Look at the format and just write out a string...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: DBF to VCF (contacts)
  Harvey Mushman
  Rick Strahl
  Jun 28, 2022 @ 09:38pm

Yep, did that but there are three versions and the lot of edge cases... for example the phone can be cell, home, mobile, work etc. and the same is true for several other values. But I was able to generate a hacked together class that did the job.

Thanks for hte reply.

Gravatar is a globally recognized avatar based on your email address. re: DBF to VCF (contacts)
  Rick Strahl
  Harvey Mushman
  Jun 29, 2022 @ 10:20am

You're going to have those issues no matter what - if there's a library it would expose those same fields and you still would need the logic to figure out what maps to what in the VCF output.

Text formats are great as they give you control so you don't have to rely on some third party library to do it for you even if it might be a little easier. I suspect there aren't any because it's pretty easy to do by hand.

+++ Rick ---

© 1996-2024