; ''每18行为一页,如果数据超出一页时进行特殊处理
If i > 18 Then
xls.ActiveWindow.SmallScroll Down:=1 ''活动窗口内容向下滚动1行
End If
If i Mod 18 = 0 Then
If countpage = 0 Then
xlsheet.Range(xlsheet.Cells(2, 1), xlsheet.Cells(i, 10)).Borders.LineStyle = xlContinuous ''首页加边框
Else
xlsheet.Range(xlsheet.Cells(23 + (countpage - 1) * 18, 1), xlsheet.Cells(i, 10)).Borders.LineStyle = xlContinuous ''中间页加边框
End If
i = i + 2 ''加一条空行
''******************************在非尾页写入签名**************************************
xlsheet.Range(xlsheet.Cells(i, 1), xlsheet.Cells(i, 10)).MergeCells = True
xlsheet.Cells(i, 1).Value = Space(64) & rst_qm.Fields(0)
xlsheet.Rows(i).RowHeight = 30
i = i + 1 ''换行
xlsheet.Range(xlsheet.Cells(i, 1), xlsheet.Cells(i, 10)).MergeCells = True
xlsheet.Cells(i, 1).Value = Space(50) & rst_qm.Fields(1)
xlsheet.Rows(i).RowHeight = 15
i = i + 1
xlsheet.Range(xlsheet.Cells(i, 1), xlsheet.Cells(i, 10)).MergeCells = True
xlsheet.Cells(i, 1).Value = Space(55) & rst_qm.Fields(2)
xlsheet.Rows(i).RowHeight = 30
''****************************************************************************
xlsheet.HPageBreaks.Add (xlsheet.Rows(i + 1)) ''添加分页符
countpage = countpage + 1 ''换页
&n