Filter an Excel file using style elements like color of the cell extracted with the help of Python openpyxl
It is possible to do that with the help of Python's Openpyxl (like with so many Excel manipulation tasks in and around KNIME).
Basically what happens is this:
* Import the Excel file into python
* activate the "Sheet1"
* find the edges, in this case, the no of rows
* iterate thru all of the cells with data in column A
* extract the style information (that was some piece of work)
* Store them in the corresponding column C
* check if the style information contains the specific colour we want to see (you could drop that once you are comfortable with the solution)
* if yes write TRUE if not FASLE into column B
* save the Excel file under a new name (so you might keep your original file)
* check the results
Please also check out the Jupyter notebook in the subdirectory of this workflow
/script/kn_forum_python_openpyxl_colour.ipynb
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.