I have to read from an Excel file that has a table in it.
The table is managed well with cell colors and dates. All cells in the table have a date, and background color. Like green is good (don’t have to do anything), yellow has a warning, and red is bad and requires attention.
I need my robot to know what date has what color so it can do the proper operation to them.
The thing is, this table size changes every day, so using Get Cell Color activity doesn’t really work. Each cell has a different date every day.
Also Read Range activity doesn’t extract the cell colors, so I am at a loss how to do this. Can anyone give me some idea?
I am not sure if my idea works, but here is what I have in my head.
Write VBA code that checks each cell in the table, and get the color index/info.
If the color index shows a cell is yellow, modify the cell data from, for example, “6/18/2020” to “Y 6/18/2020”. If the color index shows a cell is red, modify the cell data from “6/18/2020” to “R 6/18/2020”.
Before reading the Excel file using Read Range activity, use Invoke VBA activity to run the VBA code, and modify the Excel file.
Use Read Range to get the table data.
This way, the retrieved DataTable should have all the color info as a string format (e.g. “Y”, and “R”), and UiPath doesn’t really have to deal with getting cell colors.
What do you think? Is this a good idea? If there is a better idea, please let me know.