Does anyone have experience importing outlook contacts that have been exported as either a tab delimited file or a csv?
I'm struggling with how to approach this. We need to be able to import from different versions of outlook. This means that depending on the version, the csv is going to have a different number of columns.
Normally i would just use a StreamReader.ReadLine() to get a line of data and break it up into columns with a Regex.split. However, if the Notes field is used, then there is a line break at the end of the field.
Then I thought, well, I could count the number of fields in the definition row, and then if any row had less than that, it meant it was broken up and I could stitch on whichever row was after it. This doesn't work because if there are any empty fields at the end of a row, outlook doesn't add commas for them. So if there is a value in the last field, then there are commas.
If the end field is empty, then I really don't have any idea what the number of columns is when I parse a record and I can't accuratly compare it to how many columns I should expect.
If anyone can shed some light on how to do this, please let me know.
-Thanks
I'm struggling with how to approach this. We need to be able to import from different versions of outlook. This means that depending on the version, the csv is going to have a different number of columns.
Normally i would just use a StreamReader.ReadLine() to get a line of data and break it up into columns with a Regex.split. However, if the Notes field is used, then there is a line break at the end of the field.
Then I thought, well, I could count the number of fields in the definition row, and then if any row had less than that, it meant it was broken up and I could stitch on whichever row was after it. This doesn't work because if there are any empty fields at the end of a row, outlook doesn't add commas for them. So if there is a value in the last field, then there are commas.
If the end field is empty, then I really don't have any idea what the number of columns is when I parse a record and I can't accuratly compare it to how many columns I should expect.
If anyone can shed some light on how to do this, please let me know.
-Thanks