I was recently trying to incorporate a hyperlink in Excel. I used variable to table column and string manipulation to make the hyperlink since middle part of link is dynamic.
I tried using evaluate formula of Excel Appender and Also Continental Nodes XLS formatter.
Doesnt seem to work
Please see the image for reference
You need to manually press enter than only it changes to link. Any way to achieve this directly? since this will be connected to send mail node.
welcome to KNIME Community Forum!
here is a topic where this was discussed:
is it possible to create a urls like in excel? For example:
The “EXAMPLE” should be out of the KNIME-table.
All the best
Back then there was no Continental nodes for Excel available so maybe you can make it work now without CSV Writer node. Give it a try and let us know how it went
Thanks for the reply. I actually tried with this. Doesnt seem to work
You actually can use the Python package
openPyXL to insert Hyperlinks into Excel sheets - along with some other useful manipulations.
kn_example_python_excel_manipulate.knar (56.7 KB)
Thanks it worked.
could you please suggest on how to pass cell locations dynamically? I tried with variables. Doesnt seem to work
You could use KNIME variables and insert the variable into the Python code.
kn_example_python_excel_manipulate.knar (61.3 KB)
Thanks for reply. This I tried and it works. Sorry for too many questions
But I tried for eg- ws[‘A2’:‘A5’] , ws[‘A2:A5’] , none seems to work . Basically i want to pass range of cells dynamically.
I think in general this ‘style’ should work:
Maybe it is best you toy around with what you want to do and read some blog entries. OpenPyXL offers a lot of possibilities but can also be complicated.
I think some planning and experimenting is necessary. This blog offers some insights into formatting:
This blog introduces how to use openpyxl package to manipulate Excel workbook and worksheet, like create a workbook and worksheet, write values in cells, set font(size, type, bold, italic), cut and paste values from one cell to another, remove one...
kn_example_python_excel_manipulate.knar (65.8 KB)
Thanks a lot for your help
I actually inserted a ‘for loop’. So that worked.
I will definitely toy around with other approaches.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.