aceess导出成excel后,如何将单元格内容居中,代码怎写
譬如
     .Range("e3:l3").Select
     Selection.Merge
合并e3、l3单元格
怎样使合并后,单元格的内容居中

解决方案 »

  1.   

    在excel中运行宏:
    Range("e3:13").Select
        With Selection
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlBottom
            .WrapText = False
            .Orientation = 0
            .AddIndent = False
            .ShrinkToFit = False
            .MergeCells = True
        End With
      

  2.   

    .Range("e3:l3").Select
     Selection.Merge
    Selection.HorizontalAlignment = xlCenter    '水平居中
      

  3.   


       不能先在Excel中设置好吗?
       再要么先录制一个宏,在程序里调用那个宏.