你的Excel报表不是事先做好的模板吗?
你在模板里设置好不就可以了!

解决方案 »

  1.   

    With oExcel.ActiveSheet.PageSetup
            
            .TopMargin = 2 / 0.035          '顶边距2CM:
            .LeftMargin = 2 / 0.035         '左边距2CM:
            .RightMargin = 2 / 0.035        '右边距2CM:
            .BottomMargin = 2 / 0.035       '底边距2CM:        .PrintHeadings = False
            .PrintGridlines = False
            .PrintComments = xlPrintNoComments
            .CenterHorizontally = False
            .CenterVertically = False
            .Orientation = xlLandscape    'xlPortrait
            .Draft = False
            .PaperSize = xlPaperA4
            .FirstPageNumber = xlAutomatic
            .Order = xlDownThenOver
            .BlackAndWhite = False
            .Zoom = 100
    end with