# Get xls cell color

**URL:** <https://forum.knime.com/t/get-xls-cell-color/10811>\
**Category:** KNIME Analytics Platform\
**Created:** [April 18, 2018, 7:36pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811 "2018-04-18T19:36:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MateuszKojtych](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@MateuszKojtych](https://forum.knime.com/u/MateuszKojtych)\
**Post date:** [April 18, 2018, 7:36pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811/1 "2018-04-18T19:36:41Z")

</div>

Hello everyone,  
I was looking for solution, how can I read xls cell color. I did not find. Is there any chance to do this? I will be grateful for any solution.

Best Regards,  
Mateusz Kojtych

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [April 19, 2018, 2:28pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811/2 "2018-04-19T14:28:38Z")

</div>

Right now I don’t believe there is a dedicated node for this. As posted by @Ergonomist, this is a possible solution:

> [@Determine cell color (and other formatting) within an Excel sheet?](https://forum.knime.com/t/determine-cell-color-and-other-formatting-within-an-excel-sheet/3364/2):
>
> Mitch, It's quite clunky, but you can read xlsx files as wit the XML Reader and determine cell formats via XPath. Also works with pptx files etc. Awkward, but occasionally a nice end-user interface option. Cheers E

---

<div class="post-metadata">

**Author:** ![MateuszKojtych](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@MateuszKojtych](https://forum.knime.com/u/MateuszKojtych)\
**Post date:** [April 23, 2018, 11:38am UTC](https://forum.knime.com/t/get-xls-cell-color/10811/3 "2018-04-23T11:38:28Z")

</div>

Thank you for your answer. I can not read xlsx as xml. I am a bit confused. Do you have workflow as example?

---

<div class="post-metadata">

**Author:** ![ScottF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/scottf/32/61316_2.png) [@ScottF](https://forum.knime.com/u/ScottF)\
**Post date:** [April 23, 2018, 4:10pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811/4 "2018-04-23T16:10:56Z")

</div>

Unfortunately I don’t. I spent a little more time on this today, and have been unable to recreate the possible solution I linked above. Perhaps someone more well-versed than I am in XPath queries can assist.

---

<div class="post-metadata">

**Author:** ![s.roughley](https://forum-cdn.knime.com/user_avatar/forum.knime.com/s.roughley/32/366_2.png) [@s.roughley](https://forum.knime.com/u/s.roughley)\
**Post date:** [April 24, 2018, 12:28pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811/5 "2018-04-24T12:28:08Z")

</div>

The xlsx format is a zip archive of various xml files. Use `Create Temp Dir` node to create a temporary folder to unzip to, followed by `Unzip Files` node to unzip them. The worksheets are in a subfolder called ‘worksheets’ (it looks like each file is named [sheetname].xml), and it references styles in the file ‘styles.xml’, e.g.:

```
<c r="A2" s="1" t="s">
    <v>1</v>
</c>

```

The ‘s=“1”’ appears to refer the the style, defined in the styles.xml file. If you filter the table to contain only the worksheets xml files, you should be able to configure the XPath node interactively

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:29pm UTC](https://forum.knime.com/t/get-xls-cell-color/10811/6 "2023-06-23T20:29:15Z")

</div>


