JafSoft Support Forums  
  Products:
AscToHTM (text to HTML) / AscToPDF (text to PDF) / AscToRTF (text to RTF) / Detagger (HTML to text and markup removal) 

 
  Forum options:
Forum Index  Register  Login  Search  FAQ  Log Out
Member options:
My Profile  Inbox  Member List  Address Book  My Subscription  My Forums 
 
 

Note: Some forums require a login other than "Guest" in order to post messages and replies


How to add hyperlinks to a CSV table

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums > [Hints and Tips] > [Tutorials and "How To"s] > AscToHTM and AscToRTF > How to add hyperlinks to a CSV table Page: [1]
Login
Message << Older Topic   Newer Topic >
How to add hyperlinks to a CSV table - 3/20/2006 10:10:28 PM   
Jaf

 

Posts: 70
Joined: 2/1/2006
Status: offline
Normally to add a hyperlink to your text you can use the pre-processor tag

[[HYPERLINK URL,http://www.jafsof.com/asctohtm/,text-to-html converter]]


This will create a link to the AscToHTM home page with the display text "text-to-html converter".
You can also get AscToHTM/AscToRTF to convert CSV data into a table (See the article How to convert CSV data into an HTML or RTF table elsewhere in this forum.  So for example the CSV text

Symbol,-30,-20,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,Last,*,Acutrk,MOM_5,MOM_10,%G_wk,%G_2wk,%G_1yr,Sig,Trade?,Buy_on,Gain%,Cdd%,Description,
---------------------------------------------------------------------------------------------------------
IFN,80,68,80,84,82,81,86,80,82,80,82,85,76, ,96,-5,-4,-4.1,2.2,75.1,Buy, ,11/25/2005,28.5,10.7,CLOSED India
IIF,84,64,58,66,69,71,77,73,77,77,79,82,74, ,88,1,16,-3.2,0.5,57.5,Buy, ,12/16/2005,27.1,8.7,CLOSED MorgStan India
OBEGX,71,63,68,73,76,78,81,80,74,75,73,73,68, ,-25,-12,-0,-1.8,-2.8,14.9,Sell, ,,,,Oberweis Emerging Growth


Will convert into a stock price table.  If you want the symbols to become hyperlinks, you might be templed to try a HYPERLINK tag such as that above, but if you do this you'll find that the commas inside the tag cause it to be split as data between columns (of course that wouldn't be an issue in a TAB delimited table, but you may not have that choice depending on where your data is coming from).

To get round this problem, you can use the space-delimited form of the HYPERLINK tag. i.e.

[[HYPERLINK URL link=http://www.jafsof.com/asctohtm/ display="text-to-html converter"]]


Note that I've added the keywords "link=" and "display=" before the data values in this tag, and that because the display text contains a space (the delimiter now used in the above tag) I've enclosed the value in quotes.
Using this form of the tag the CSV data can be edited as follows

Symbol,-30,-20,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,Last,*,Acutrk,MOM_5,MOM_10,%G_wk,%G_2wk,%G_1yr,Sig,Trade?,Buy_on,Gain%,Cdd%,Description,
---------------------------------------------------------------------------------------------------------
[[HYPERLINK URL link=http://www.stockcharts.com/h-sc/ui?s=IFN display=IFN]],80,68,80,84,82,81,86,80,82,80,82,85,76, ,96,-5,-4,-4.1,2.2,75.1,Buy, ,11/25/2005,28.5,10.7,CLOSED India
[[HYPERLINK URL link=http://stockcharts.com/h-sc/ui?s=IIF display=IIF]],84,64,58,66,69,71,77,73,77,77,79,82,74, ,88,1,16,-3.2,0.5,57.5,Buy, ,12/16/2005,27.1,8.7,CLOSED MorgStan India
[[HYPERLINK URL link=http://stockcharts.com/h-sc/ui?s=OBEGX display=OBEGX]],71,63,68,73,76,78,81,80,74,75,73,73,68, ,-25,-12,-0,-1.8,-2.8,14.9,Sell, ,,,,Oberweis Emerging Growth


When this is now converted into a table, the symbols "IFN", "IIF" and "OBEGX" in the first column will now be active hyperlinks.

Notes:
(1)  The "Display=" keyword isn't strictly necessary, but the "link=" keyword is advisable in case the URL itself contains an "=" character which would confuse the pre-processor

< Message edited by Jaf -- 5/27/2006 12:31:34 PM >
Post #: 1
Page:   [1]
All Forums > [Hints and Tips] > [Tutorials and "How To"s] > AscToHTM and AscToRTF > How to add hyperlinks to a CSV table Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts