Color the particular row of the excel sheet
조회 수: 22 (최근 30일)
이전 댓글 표시
Gopalakrishnan venkatesan
2015년 5월 8일
댓글: Gopalakrishnan venkatesan
2015년 5월 8일
I need to color the particular row of the excel sheet. How can i do this ?
댓글 수: 0
채택된 답변
Thomas Koelen
2015년 5월 8일
편집: Thomas Koelen
2015년 5월 8일
% 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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!