0
我有一个问题:如何将'values {num_rows + 1}'的值放在excel单元格的中心?我看到我不得不使用函数:set(ActivesheetRange,'HorizontalAlignment',3);但我不知道如何使用它。matlab对齐居中excel单元格的文本
e = actxserver ('Excel.Application'); %# open Activex server
filename = fullfile(pwd,'example2.xlsx'); %# full path required
ewb = e.Workbooks.Open(filename); %# open the file
esh = ewb.ActiveSheet;
str = num2str(num_rows+1);
esh.Range(strcat('J',str)).Interior.Color = clr;
sheet1=e.Worksheets.get('Item', 'Sheet1');
range1=get(sheet1,'Range', strcat('A',str),strcat('I',str));
range1.Value= set(values{num_rows+1},'HorizontalAlignment',,'center');
感谢大家:]
非常感谢! :] – 2012-04-14 16:14:38