Range ranTitle1 = worksheet.get_Range("A1", sLen + "1");
ranTitle1.get_Range("A1", sLen + "1").MergeCells = true;
ranTitle1.Font.Size = 12;
ranTitle1.Font.FontStyle = "宋体";
ranTitle1.Font.Bold = true;
ranTitle1.get_Range("A1", sLen + "1").Value2 = title;
ranTitle1.Columns.AutoFit();//这行代码没有效果
worksheet.get_Range("A1", sLen + "1").HorizontalAlignment = XlHAlign.xlHAlignCenterAcrossSelection;