Effacer les filtres
Effacer les filtres

How can I detect a change in cell value from a series of an excel sheet and then Highlight the change through a script

3 vues (au cours des 30 derniers jours)
I have a large excel sheet which consists of strings and Integers. I have read the sheet through 'readtable' but How can I compare a cell value(column wise) from it's previous cell value and Highlight the cell by a particular colour?
Any Help would be appreciated.
  2 commentaires
dpb
dpb le 1 Juil 2021
Look at diff() to find differences of given variable -- remember the output array is one less in length than the input array in finding the actual array location.
As for changing formatting inside Excel, that's a job that has to be done with ActiveX/COM
There are sample routines that have been posted in the past although I didn't think to save a link -- if somebody else doesn't get there first, I'll try to come back and attach the utility routines code.
Undoubtedly is something at FEX, too,
Sanjeev Pareek
Sanjeev Pareek le 2 Juil 2021
Using diff() can be a option, but won't compare work as I am unable find any command for integer compare like strcmp.
Can you shed some light on this, regarding changes in excel, I have explored actserver and the script provided by Jiro, but then changes can happen in hardcoded cells, though I need generalised which is not working with "WB.Worksheets.Item(1).Range('H8').Interior.ColorIndex = 3;" as can be seen a particular cell colour can be changed, but I want to generalise it, any ideas on that will be helpful along with above elaboration.
Thanks

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by