matlab中数据写入excel时,如何设置单元格大小?
我想用matlab生成一份试卷分析到excel中,但不知道如何设置单元格宽度和高度,以及边框宽度,还有字体大小,请各位赐教,谢谢!!!Excel = actxserver('Excel.Application');
set(Excel, 'Visible', 1);
Workbooks = Excel.Workbooks;
Workbook = invoke(Workbooks, 'Add');
Sheets = Excel.ActiveWorkBook.Sheets;
sheet1 = get(Sheets, 'Item', 1);
invoke(sheet1, 'Activate');
Activesheet = Excel.Activesheet;
ActivesheetRange = get(Activesheet,'Range','A1:I1');
set(ActivesheetRange,'MergeCells',1);
set(ActivesheetRange,'HorizontalAlignment',3);
set(ActivesheetRange,'Value','试 卷 分 析');
已经解决!!!
ActivesheetRange.Font.size=15;ActivesheetRange.Font.bold=2;
ActivesheetRange.Borders.Weight=2;
ActivesheetRange.Borders.LineStyle=7;
ActivesheetRange.RowHeight=20;
ActivesheetRange.ColumnWidth=10; {:{39}:}{:{39}:}{:{39}:} 很有用,谢谢
页:
[1]