Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Creating Hyperlink in excelsheet report for few cells
PriyaK
<p><span style="font-size:10pt;">Hi All,</span></p>
<p> </p>
<p><span style="font-size:10pt;">I have requirement in which I have to create hyperlink to only those data in excelsheet for which associated tab is available.</span></p>
<p> </p>
<p><span style="font-size:10pt;">For Example refer sample excelsheet report attached.</span></p>
<p> </p>
<p><span style="font-size:10pt;">In this excelsheet report there is mainpage and two linked sheets.</span></p>
<p> </p>
<p><span style="font-size:10pt;">In Mainpage you can see hyperlink for two cells data in </span><span style="color:#000000;"><span style="font-size:10pt;">AUTH_OPT_VAL </span></span><span style="font-size:10pt;">column because its corresponding sheets are </span><span style="font-size:8pt;">available</span><span style="font-size:10pt;"> for these two values, and rest of the other values there is no hyperlink.</span></p>
<p> </p>
<p><span style="font-family:'times new roman', serif;"><span style="font-size:10pt;">So to achieve this I have set hyperlink property of </span></span><span style="color:#000000;"><span style="font-family:'times new roman', serif;"><span style="font-size:10pt;">AUTH_OPT_VAL to "#"+row["AUTH_OPT_VAL"]+"!A1"</span></span></span></p>
<p><span style="color:#000000;"><span style="font-family:'times new roman', serif;"><span style="font-size:10pt;">But due to this I can see whole data in this column is hyperlinked and whenever I clicked on other data, I am getting error “reference is not validâ€</span></span></span></p>
<p><span style="color:#000000;"><span style="font-family:'times new roman', serif;"><span style="font-size:10pt;">So please let me know is there any way we can create hyperlink only to those data for which sheets are available.</span></span></span></p>
<p><span style="color:rgb(40,40,40);"><span style="font-family:'times new roman', serif;"><span style="font-size:9pt;">I am using BIRT 4.5.0 version</span></span></span>.</p>
Find more posts tagged with
Comments
JFreeman
<p>With the way your script is setup, it will apply that formula to every row no matter what which is why you are seeing this behavior. To get around this you are going to need to add some conditional code around your script to determine row by row if there will be a need for a link and then only apply your script if there should be a link.</p>
PriyaK
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Thanks
@JFreeman
but Can you give me any sample for this.</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;">Also one more question when I am exporting report as XLS or XLS_SPUDSOFT , hyperlink are not generating in excel report using below code.</span></span></p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><span style="color:rgb(0,0,0);">"#"+row["AUTH_OPT_VAL"]+"!A1"</span></span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><span style="color:rgb(0,0,0);">But when I am exporting report as a XLSX its generating fine.</span></span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:arial, helvetica, sans-serif;"><span style="color:rgb(0,0,0);">Can anyone </span></span></span><span style="color:rgb(0,0,0);font-family:arial, helvetica, sans-serif;">know how to fix this.</span></p>