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

2 views (last 30 days)
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 Comments
dpb
dpb on 1 Jul 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 on 2 Jul 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

Sign in to comment.

Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!