Clickable links in Table to HTML

Dear friends,

I’m sorry for asking such a stupid question, but I can’t find a solution for several days and stuck with a simple task: I’d like to export links from KNIME table to html file.
Table to html works perfectly well, but I can’t make html links clickable. I tried several simple approaches and failed.

Can you please teach me how to solve this task.

Let’s say there’s a KNIME table

URL Title
https://www.knime.com/ KNIME

I’d like to have html file with a clickable link https://www.knime.com/

Thank you very much for your time. Your help will be very appreciated.

Hi @DmitryIvanov76,

You can create a column containing an HTML link code using a String Manipulation node.

join("<a href=\"", $URL$, "\">", $Title$, "</a>")

Note that, you can not use the same JavaScript view of the Table View node directly to display the linked web content. But you can make sure the link opens in a new browser window by modifying the link target as shown below.

join("<a href=\"", $URL$, "\" target=\"_blank\">", $Title$, "</a>")

Attached is an example workflow. forum_clickable_link.knwf (10.2 KB)

Best,
Temesgen

6 Likes

Dear Temesgen,

Thank you very much for your help! Your solution works perfectly well indeed!

The funnies thing is that I did try exactly the same approach, but it seems that I made a mistake and proceed further in search of more complex solution :slight_smile:

Wish you a great day!

Dmitry

Dear Dmitry,

I am glad the solution worked for you. Can you please mark the post as Solution?

Thanks,
Temesgen

1 Like

I will 100%!

If it is not too much, can you please also let me know how to make html file with working links…
With java tables it works great, but when I try exporting the table to html (I use Table to HTML), links are not working,

I will definately stay with the solution which you proposed, but having html file would be also very useful.

1 Like

Hi Dmitry,

You are right the Table to HTML replaces ‘<’ symbols by ‘&lt;’ because it intends to display the content of the table as it is (raw table content that is seen when opening the table in KNIME). It is a bit of a hack, but you can read back your html using a line reader and replace ‘&lt;’ symbols with actual ‘<’.

Here is an example workflow extending the first solution. forum_clickable_link.knwf (17.7 KB)

Best,
Temsgen

5 Likes

You are great!
Thank you very much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.