oSheet1 = (Excel.Worksheet) oNewBook.ActiveSheet;
oRange = oSheet1.get_Range("A1","A1");
oRange.WrapText = true;
oRange = oSheet1.get_Range("A1","A1"); //指定的单元格
MyRng.WrapText = true; //自动换行
MyRng.EntireRow.AutoFit();//行高根据内容自动调整
解决问题的思路:到excel里去录制宏,然后把代码拷贝到程序里