Hub
Pricing About
WorkflowWorkflow

Filter an Excel file using style elements like color of the cell extracted with the help of Python openpyxl

RgbCellColorPythonOpenpyxl
+2
mlauber71 profile image
Draft Latest edits on 
Jan 24, 2020 4:27 PM
Drag & drop
Like
Download workflow
Workflow preview
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

External resources

  • KNIME Python Integration Installation Guide
  • Python Installation (the short story)
  • Get Edge of Worksheet
  • forum entry
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 4.1.0 Note: Not all extensions may be displayed.
  • Go to item
    KNIME CoreTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.1.0

    knime
  • Go to item
    KNIME Excel SupportTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.1.0

    knime
  • Go to item
    KNIME Python Integration

    KNIME AG, Zurich, Switzerland

    Version 4.1.0

    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits