首页 新闻 会员 周边 捐助

急!急!急!请教在owc中设置合并单元格的内容为自适用大小,导出到execl时没有出现自适应效果

0
悬赏园豆:50 [已关闭问题]

 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;
             

cqf2000的主页 cqf2000 | 初学一级 | 园豆:140
提问于:2008-12-19 20:20
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册