Import from CSV file into Outlook contacts

W

Walshs13

Hello!

I am generating a CSV file to import contacts into Outlook
(various versions). The data come from an SQL database
where street 1, street 2, and street 3 are in separate
columns. I would like to combine those three columns into
one field, which Outlook calls Business Address, and I'd
like to concatenate the three values with carriage returns
in between. How do I add the return?

I've tried SQL like so: select street_1 + <delim> +
street_2... (very simplifed version of my actual
statement) and my question revolves around which is the
proper <delim> to use.

When I use char(13) and/or char(10), the CSV file breaks
the column so hard that even Excel can't tell that the
values belong to one column, but instead creates new rows.

When I use '\n' and/or '\r', Excel and then Outlook treat
that like plain text; I get addresses on one line, with
\n's and \r's interspersed.

What is the proper way to indicate a 'soft' return?

(I've looked at the results of 'Export from Outlook to
CVS', but there, the soft return is shown as a rectangle
which I am unable to deciphre.)

Thanks in advance for any suggestions.

Simon
 
K

Karl Timmermans

All you need to do is map the individual fields to the respective street
address lines and these will be combined into a single street address by
Outlook so there really isn't any need to concantenate the fields
separately.

I suspect that the reason Excel is having an issue with your file is that
the field itself is not bracketed with starting and ending "quotation" marks
which tells it that everything in between is part of the same field. In
terms of the delim - would be <CR><LF> chr(13) & chr(10) but these must be
embedded within a single field as just described.

Karl

--
__________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - Importer 1.3 / DataPorter 2.0
"Power contact importers for MS Outlook '2000/2003"
http://www.contactgenie.com
 
W

walshs13

Hi, Karl. Thank you for the response. Naturally, I would
love to map the individual fields to their respective
addresses lines, but I don't see such lines in my
Outlook's contact options. Outlook provides "Business
Address City", "Business Address State", etc. And I am
able to map city to city, state to state, etc. But our
database has up to three separate street lines, (in the db
as cols street_1, street_2, street_3), which I would like
to combine into the, what seems to be only available
field "Business Address Street".

I'll try to make the SQL statement smarter by surrounding
the entire street line with double quotes, to see if that
helps Excel and Outlook understand the embedded char
(13)'s. I appreciate the tip, and will let you know the
results.

Thanks again,

Simon
 
W

walshs13

Karl, you were right! Wrapping the concatenated string in
quotes was enough to get Excel and Outlook to understand
the line feeds. Thank you very, very much!

Simon
-----Original Message-----
Hi, Karl. Thank you for the response. Naturally, I would
love to map the individual fields to their respective
addresses lines, but I don't see such lines in my
Outlook's contact options. Outlook provides "Business
Address City", "Business Address State", etc. And I am
able to map city to city, state to state, etc. But our
database has up to three separate street lines, (in the db
as cols street_1, street_2, street_3), which I would like
to combine into the, what seems to be only available
field "Business Address Street".

I'll try to make the SQL statement smarter by surrounding
the entire street line with double quotes, to see if that
helps Excel and Outlook understand the embedded char
(13)'s. I appreciate the tip, and will let you know the
results.

Thanks again,

Simon
 
K

Karl Timmermans

Glad you got it to work but you should have a "+" sign beside the Business
Address field on the mapping page - by expanding that, you'll see 3 address
lines - just something to keep in mind for the next time.

Karl

--
__________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - Importer 1.3 / DataPorter 2.0
"Power contact importers for MS Outlook '2000/2003"
http://www.contactgenie.com


walshs13 said:
Karl, you were right! Wrapping the concatenated string in
quotes was enough to get Excel and Outlook to understand
the line feeds. Thank you very, very much!

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top