I have a data table with only one row and a lot of columns. I want to highlight if any of the columns contain a value i.e. I want to highlight the cell if the cell is not blank.
In the above example only Uni name is present, I want to highlight that cell
The value could be present in any of the other columns as well. I want to highlight the cells in which a value is present.
In an excel application scope, use “lookup range” to get the cell ID, then you can use set range color to change that cell ID.
Now, this will only highlight the first instance. Maybe loop though with a ‘for every row’?
@NervYerem Thanks for the response
I actually want to highlight all the cells which are not blank. I do not know which cell would contain values. In the above example problem, my datatable contains only one value. There could be two or more values also, I want to highlight all of the them, see the image below for reference.
maybe you can read the range, then use a for each row, and check if the row is empty or it has value, if it has value then use the set range color in this particular item, if its empty just ignore it
@fernando_zuluaga Thanks for the response
I am unable to understand how to get the cell address in which the value is present and I need to highlight that cell with a colour.
Hi @Pruthvi.G ,
Have you tried using the Set Range Color Activity yet?
It can only be used within an Excel Application Scope though.
You can try with Lookup DataTable
Try this expression
DtMaster.AsEnumerable.Select (Function(x) x("University").ToString.Trim.Contains("IIT Madras")).ToArray()
Have a look on the thread for Highlighting
i made it for you
check the xaml
test.xaml (13.1 KB)
hope it help you
Thank you so much for your help. That should work.
Which method did you use? (Can’t download xaml files to review)
Nice! That’s nice and clean.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.