Home All Groups Group Topic Archive Search About
Author
10 May 2007 2:35 PM
Ed Wyche
I am trying to to this link in a csv file
Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & "\\" & txtServerName &
"\Users$\" & strUsername & Chr(34) & Chr(44) & Chr(34) & "Folder" & Chr(34)
& ")" & Chr(34)

When I open the CSV excel sees the chr(44) as a comma and thinks "Folder" is
another cell.

Can someone giv me a solution to this.

Thanks
Ed

Author
10 May 2007 3:17 PM
Mike Williams
"Ed Wyche" <n***@none.com> wrote in message
news:O37ktBxkHHA.1624@TK2MSFTNGP02.phx.gbl...

>I am trying to to this link in a csv file
> Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & "\\" & txtServerName &
> "\Users$\" & strUsername & Chr(34) & Chr(44) & Chr(34) & "Folder" &
> Chr(34) & ")" & Chr(34)
> When I open the CSV excel sees the chr(44) as a comma and thinks
> "Folder" is another cell.

Chr(44) is a comma. What would you like it to be?

Mike
Author
10 May 2007 4:45 PM
Ed Wyche
I would like it to be a comma.  But I want it to be part of the hyperlink
field.  Right now when you open up the CSV in excel it reads that comma as a
delimeter.  I don't want that comma to be a delimeter.

Show quoteHide quote
"Mike Williams" <m***@whiskyandCoke.com> wrote in message
news:ush0NZxkHHA.960@TK2MSFTNGP03.phx.gbl...
> "Ed Wyche" <n***@none.com> wrote in message
> news:O37ktBxkHHA.1624@TK2MSFTNGP02.phx.gbl...
>
>>I am trying to to this link in a csv file
>> Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & "\\" & txtServerName &
>> "\Users$\" & strUsername & Chr(34) & Chr(44) & Chr(34) & "Folder" &
>> Chr(34) & ")" & Chr(34)
>> When I open the CSV excel sees the chr(44) as a comma and thinks
>> "Folder" is another cell.
>
> Chr(44) is a comma. What would you like it to be?
>
> Mike
>
>
>
>
Author
10 May 2007 5:08 PM
Bob Butler
"Ed Wyche" <n***@none.com> wrote in message
news:upfyTKykHHA.596@TK2MSFTNGP06.phx.gbl...
>I would like it to be a comma.  But I want it to be part of the hyperlink
>field.  Right now when you open up the CSV in excel it reads that comma as
>a delimeter.  I don't want that comma to be a delimeter.

>>>I am trying to to this link in a csv file
>>> Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & "\\" & txtServerName &
>>> "\Users$\" & strUsername & Chr(34) & Chr(44) & Chr(34) & "Folder" &
>>> Chr(34) & ")" & Chr(34)

try doubling the embedded quotes
Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & Chr(34) & "\\" & txtServerName
& _
  "\Users$\" & strUsername & Chr(34) & Chr(34) & Chr(44) & Chr(34) & Chr(34)
&
  "Folder" & Chr(34) & Chr(34) & ")" & Chr(34)
Author
11 May 2007 1:57 PM
Ed Wyche
Thanks that worked.

Show quoteHide quote
"Bob Butler" <noway@nospam.ever> wrote in message
news:%23LMJOXykHHA.4852@TK2MSFTNGP03.phx.gbl...
> "Ed Wyche" <n***@none.com> wrote in message
> news:upfyTKykHHA.596@TK2MSFTNGP06.phx.gbl...
>>I would like it to be a comma.  But I want it to be part of the hyperlink
>>field.  Right now when you open up the CSV in excel it reads that comma as
>>a delimeter.  I don't want that comma to be a delimeter.
>
>>>>I am trying to to this link in a csv file
>>>> Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & "\\" & txtServerName &
>>>> "\Users$\" & strUsername & Chr(34) & Chr(44) & Chr(34) & "Folder" &
>>>> Chr(34) & ")" & Chr(34)
>
> try doubling the embedded quotes
> Print #3, Chr(34) & "=Hyperlink(" & Chr(34) & Chr(34) & "\\" &
> txtServerName & _
>  "\Users$\" & strUsername & Chr(34) & Chr(34) & Chr(44) & Chr(34) &
> Chr(34) &
>  "Folder" & Chr(34) & Chr(34) & ")" & Chr(34)
>
>
Author
10 May 2007 6:05 PM
Paul Clement
On Thu, 10 May 2007 12:45:09 -0400, "Ed Wyche" <n***@none.com> wrote:

¤ I would like it to be a comma.  But I want it to be part of the hyperlink
¤ field.  Right now when you open up the CSV in excel it reads that comma as a
¤ delimeter.  I don't want that comma to be a delimeter.
¤

If the text contains a comma it will need to be enclosed in double quotes.


Paul
~~~~
Microsoft MVP (Visual Basic)
Author
11 May 2007 3:31 AM
Walter Wang [MSFT]
Hi Ed,

As other community members contributed, to ensure a column in CVS file is
recognized by Excel correctly, you can enclose it with quotes. If the
column data already contains quotes, you need to double it.

For example, following simple CVS file will show the difference:

a,b,c
v1,v2,2,v3
v1,"v2,2",v3
v1,"v2,""x"",2",v3


Hope this helps.


Regards,
Walter Wang (waw***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.