Conditional Formatting in Excel
    9 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
How to apply conditional formatting in Excel. Here is my code:
 file='Result.xlsx';
 data=rand(5,5);
 range='B2:E5';
 file = fullfile(pwd, file);
 Excel = actxserver('excel.application');
 wb=Excel.WorkBooks.Add();
 ran = Excel.Activesheet.get('Range',range);
 ran.value = data;
 % conditional formatting
 xlCellValue = 1;
 Excel.Selection.FormatConditions.Delete;
 Excel.Selection.FormatConditions.Add(xlCellValue,1,'0','1');
 %
 wb.SaveAs(file); 
 wb.Close;
 Excel.Quit;
 Excel.delete;
0 commentaires
Réponses (0)
Voir également
Catégories
				En savoir plus sur ActiveX dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
