我想打印flexgrid的报表内容,用excel读出来,但打印却没有表格和标题,怎么用函数写标题和画表格呀?

解决方案 »

  1.   

    表格
    '罫線
            With .Range("A5:" & strColRow)
    '            .WrapText = True                    '折り返し
                .Borders(xlDiagonalDown).LineStyle = xlNone
                .Borders(xlDiagonalUp).LineStyle = xlNone
                With .Borders(xlEdgeLeft)           '左罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
                With .Borders(xlEdgeTop)            '上罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
                With .Borders(xlEdgeBottom)         '下罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
                With .Borders(xlEdgeRight)          '右罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
                With .Borders(xlInsideVertical)     '縦罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
                With .Borders(xlInsideHorizontal)   '横罫線を書く
                    .LineStyle = xlContinuous
                    .Weight = xlThin
                    .ColorIndex = xlAutomatic
                End With
            End With
      

  2.   


    With ActiveSheet.PageSetup
            .LeftHeader = "头"
            'OR .CenterHeader = "头"
            'OR .RightHeader = "头"
        End With