|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hyperlink in a CSVI 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 "Ed Wyche" <n***@none.com> wrote in message Chr(44) is a comma. What would you like it to be?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. Mike 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 > > > > "Ed Wyche" <n***@none.com> wrote in message try doubling the embedded quotesnews: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) 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) 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) > > 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) 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.
VB 10 To Support Native Exe/DLL
Is there anyone uses VS6 on Windows2000 Pro? Exiting from a Do Loop Advice on storage and retrieval A bit of Maths help with arrays Right syntax for EXPRESSION How to control button in the form if i have more than 1 user profi Closing recordset Excuting a command line program from within VB Sending email from app in vb6 to hotmail |
|||||||||||||||||||||||