1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
global matrix;% matrice qui sera stocker dans mon fichier excel
[filename, pathname] = uiputfile('*.xls', 'Choose a file name');
outname = fullfile(pathname, filename);
xlswrite(outname, matrix );
%ActiviX to color excel cell
% Connect to Excel
Excel = actxserver('excel.application');
% Get Workbook object
WB = Excel.Workbooks.Open(outname);
% Set the color of cell "A1" of Sheet 1 to RGB
WB.Worksheets.Item(1).Range('A1').Interior.Color = hex2dec('00FF00');
% Save Workbook
WB.Save();
% Close Workbook
WB.Close();
% Quit Excel
Excel.Quit(); |
Partager