Home > Archive > PERL Beginners > June 2006 > CSV file that can be loaded to Microsoft Outlook
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CSV file that can be loaded to Microsoft Outlook
|
|
| Mihir Kamdar 2006-06-24, 6:58 pm |
| hi,
I have written a perl script whose output is a CSV file(semicolon seperated)
in keeping reference to the Outlook Address Book. But whenever I am
importing the file to Outlook, it gives me some data error, and does not get
imported.
Can anybody help me on this??
thanx,
mihir
| |
| Ryan Frantz 2006-06-24, 6:58 pm |
|
> -----Original Message-----
> From: Mihir Kamdar [mailto:kamdarmihir06@gmail.com]
> Sent: Saturday, June 24, 2006 10:41 AM
> To: beginners
> Subject: CSV file that can be loaded to Microsoft Outlook
>=20
> hi,
Howdy,
>=20
> I have written a perl script whose output is a CSV file(semicolon
> seperated)
'CSV' means _Comma_ Separated Values. Semicolons won't work.
ry
> in keeping reference to the Outlook Address Book. But whenever I am
> importing the file to Outlook, it gives me some data error, and does
not
> get
> imported.
>=20
> Can anybody help me on this??
>=20
> thanx,
> mihir
| |
| Mr. Shawn H. Corey 2006-06-24, 6:58 pm |
| On Sat, 2006-24-06 at 10:50 -0400, Ryan Frantz wrote:
> 'CSV' means _Comma_ Separated Values. Semicolons won't work.
CSV are also doubly escaped. Commas in CSV are escaped by placing them
inside double-quotes. Double-quotes, inside double-quotes, are escaped
by placing two in a row; but if they're outside double-quotes, there's
just one of them. The following is a valid CSV line:
,",","""","""""",""","""
Confused? I recommend you find a module in CPAN to format your output
correctly.
http://search.cpan.org/
--
__END__
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
| |
| Mihir Kamdar 2006-06-25, 6:58 pm |
| hii,
thanx a lot for your immediate reply...
now i m able to import but after that it is not taking up correct values.
Following is the line that i m trying to import. Now if i keep this as a
single line in the CSV file (no word wrap), then Outlook is not importing
it. Only if I break the line, then it is taking it...but in that case while
maping the fields, when I do next in souce file, then it wipes off all the
previous mappings. So ultimately after importing to contacts, I m getting
jumbled up values(like Mobile No against first name,etc)..
I have no clue as to where i m wrong.
, "Suhail", , "Khan", , "Xyz Technologies Ltd", "Engineering", "VP
-Engineering", "nth Block, Koramangala", "Bangalore 560 095 India", , , , ,
, , , , , , , , , , , , , , , , , , , , , "+91-80-25000000, ext 3300", , , ,
, "+91-9900000000", , , , , , , , , , , , , , , , , "
suhailk@xyztechnologies.com", , "suhailk", , , , , , , , , , , , , , , , , ,
, , "004", , , , , , , , , , , , ,
thanx,
mihir
On 6/24/06, Mr. Shawn H. Corey <shawnhcorey@magma.ca> wrote:
>
> On Sat, 2006-24-06 at 10:50 -0400, Ryan Frantz wrote:
>
> CSV are also doubly escaped. Commas in CSV are escaped by placing them
> inside double-quotes. Double-quotes, inside double-quotes, are escaped
> by placing two in a row; but if they're outside double-quotes, there's
> just one of them. The following is a valid CSV line:
>
> ,",","""","""""",""","""
>
> Confused? I recommend you find a module in CPAN to format your output
> correctly.
>
> http://search.cpan.org/
>
>
> --
> __END__
>
> Just my 0.00000002 million dollars worth,
> --- Shawn
>
> "For the things we have to learn before we can do them, we learn by doing
> them."
> Aristotle
>
> * Perl tutorials at http://perlmonks.org/?node=Tutorials
> * A searchable perldoc is at http://perldoc.perl.org/
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
| |
| Timothy Johnson 2006-06-26, 6:58 pm |
| You have an extra double-quote in there after the email address. So far
this doesn't seem to be a Perl problem.
-----Original Message-----
From: Mihir Kamdar [mailto:kamdarmihir06@gmail.com]=20
Sent: Sunday, June 25, 2006 7:02 AM
To: Mr. Shawn H. Corey
Cc: beginners
Subject: Re: CSV file that can be loaded to Microsoft Outlook
hii,
thanx a lot for your immediate reply...
now i m able to import but after that it is not taking up correct
values.
Following is the line that i m trying to import. Now if i keep this as a
single line in the CSV file (no word wrap), then Outlook is not
importing
it. Only if I break the line, then it is taking it...but in that case
while
maping the fields, when I do next in souce file, then it wipes off all
the
previous mappings. So ultimately after importing to contacts, I m
getting
jumbled up values(like Mobile No against first name,etc)..
I have no clue as to where i m wrong.
, "Suhail", , "Khan", , "Xyz Technologies Ltd", "Engineering", "VP
-Engineering", "nth Block, Koramangala", "Bangalore 560 095 India", , ,
, ,
, , , , , , , , , , , , , , , , , , , , , "+91-80-25000000, ext 3300", ,
, ,
, "+91-9900000000", , , , , , , , , , , , , , , , , "
suhailk@xyztechnologies.com", , "suhailk", , , , , , , , , , , , , , , ,
, ,
, , "004", , , , , , , , , , , , ,
thanx,
mihir
On 6/24/06, Mr. Shawn H. Corey <shawnhcorey@magma.ca> wrote:
>
> On Sat, 2006-24-06 at 10:50 -0400, Ryan Frantz wrote:
>
> CSV are also doubly escaped. Commas in CSV are escaped by placing them
> inside double-quotes. Double-quotes, inside double-quotes, are escaped
> by placing two in a row; but if they're outside double-quotes, there's
> just one of them. The following is a valid CSV line:
>
> ,",","""","""""",""","""
>
> Confused? I recommend you find a module in CPAN to format your output
> correctly.
>
> http://search.cpan.org/
>
>
> --
> __END__
>
> Just my 0.00000002 million dollars worth,
> --- Shawn
>
> "For the things we have to learn before we can do them, we learn by
doing
> them."
> Aristotle
>
> * Perl tutorials at http://perlmonks.org/?node=3DTutorials
> * A searchable perldoc is at http://perldoc.perl.org/
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
|
|
|
|
|