Excel单元格的合并

Excel.Application myExcel=new Excel.Application();
myExcel.Application.Workbooks.Add(true);
myExcel.Visible=true;
Excel.Worksheet worksheet=(Excel.Worksheet)myExcel.ActiveSheet;

Excel.Range rH = worksheet.get_Range("A1","A3");
rH.Merge(0);
myExcel.Cells[1,1]="赋值";

你可能感兴趣的:(Excel)