Is there a way to read an excel tab color in UiPath? I would like to extract information from a workbook with several tabs, but only for the ones which have a certain color.
Alternatively, it would also be fine to exclude tabs with red color, for example.
Thanks for your reply. I mean reading the color of the tab, where you see the tab name. Is it possible with get cell color? If so, can you give an example or explain please?
Thank you for the answer! I can run the code and get the text box. In my project, I have several excel workbooks with many tabs each. For all of these workbooks, some of the tabs are red, others not. What I would like to do is for each of the tabs in each of the workbooks, extract certain information if the tab color is not red. Most of my workflow is built already, its just that at this moment I can not identify which tabs are red and which are not, so in the end im extracting the info from every tab.
Therefore, what would be your recommendation to overcome this?
Ok, so it sounds like you have the logic down for your process. I’m guessing you have implemented some sort of loop to check if a tab is red or not. Then using an If statement based on if the RGB is red, you continue.
You can modify the VBA to best fit your needs. If excel is open, it can read the message box using get text. Are you asking what alternative ways there are to determine the color besides a text box?
How does that work? I don’t know anything about VBA and using it and I need to do the same kind of thing. I want to use this to get a list of sheets with a certain color so I can get the data on those sheets to process.
There are probably better methods but this outputs the color of the tab. This uses the ClosedXML namespace so make sure its imported on your project. You can find more information at: Home · ClosedXML/ClosedXML Wiki · GitHub
I can’t see any information on github related to this. How does it work? Do I just put the name of the file I’m trying to read in the filename variable?