Write excel data file with column with drop down list.


I was wondering if there is a not complex way (or any way) to write some data in knime as a xlsx (excel) with added column that contains drop down list. I would like to have excel file that has column where for each row I can choose a predefined option.

For example:
File is composed of 6 rows of some numbers.


I would like to add column “extra info” with pre-defined options like: yes, no, not sure.
Now when someone gets this excel when he clicks on second column for each row he will have option to choose.

ID. extra info
123. No
245. No
678. Yes
999. Not sure


Yes that is possible with the help of Python and openpyxl


You could also check out this thread


Thanks :slight_smile: Can you help me to adapt this to my work ? I divide tasks upon some workers:

KNIME_project_dropdownlist.knwf (46.7 KB)

I am noob to Python - sorry :frowning:

Is’t there any other way to do it with some standard nodes? I heard that there is a community extension continental or something like that - but did not find a solution.

I do not know any continental extension that could do what you want.


1 Like

Unfortunately there isn’t. Can you help me adopt your concept to my workflow?

@89trunks I am not entirely sure what you mean. I checked your workflow and do not understand why you are using the loop. I have adapted the Python code and added some more comments for clarity.

There is no need to loop thru the lines. You would just tell Python openpyxl that the validation rule you have defined should be applied to the area B2:B6. The number of lines is now created dynamically from the data and given to Python by Flow Variable - you could also just set the range by hand if you would know it.

1 Like