Color the particular row of the excel sheet
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gopalakrishnan venkatesan
el 8 de Mayo de 2015
Comentada: Gopalakrishnan venkatesan
el 8 de Mayo de 2015
I need to color the particular row of the excel sheet. How can i do this ?
0 comentarios
Respuesta aceptada
Thomas Koelen
el 8 de Mayo de 2015
Editada: Thomas Koelen
el 8 de Mayo de 2015
% Connect to Excel
Excel = actxserver('excel.application');
% Get Workbook object
WB = Excel.Workbooks.Open(fullfile(pwd, 'Book1.xlsx'),0,false);
% Set the color of cell "A1" of Sheet 1 to Yellow
WB.Worksheets.Item(1).Range('A1').Interior.ColorIndex = 6;
% Save Workbook
WB.Save();
% Close Workbook
WB.Close();
% Quit Excel
Excel.Quit();
Does this, ofcourse you can change all the values.
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!