matlab to excel conditional formatting using different sheet.
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I have some data in a matrix (data) and various checks have been applied on this data (and more) to get a logical array of 'flags'. I would like to write data to excel and highlight the cells which have failed (equal to 1) according the flag array. The flag array will also be written to excel in a separate sheet but will not be formatted.
I am using xlsCondFormNeg from file exchange and have got it working for conditions within data but not by using another sheet Does anyone know how I would change the part of the script below to allow me to format matrix 'data' using logical array 'flags'?
I tried creating a macro in excel to get the VB script and using ['=' range 'Flags!>0'] instead but I get ' Invoke Error, Dispatch Exception: The parameter is incorrect.' I have (probably obviously) little experience with VB beyond the very basic so any help would be appreciated.
ExAct = Excel.Activesheet; ExActRange = get(ExAct,'Range',range); ExActRange.Select;
xlExpression=2; Excel.Selection.FormatConditions.Delete; Excel.Selection.FormatConditions.Add(xlExpression, [], ['=' range '>0']); Excel.Selection.FormatConditions.Item(1).Font.ColorIndex = 3;
thanks
Rachel
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!