'MessageBox.Show(300)
If drs.Count > 0 Then
Dim App31 As New MSExcel.Application
Dim Book5 As New XLS.Book(cy_Ass)
Dim SheetSrh4 As XLS.Sheet = Book5.Sheets("信息收集")
Dim Wb31 As MSExcel.WorkBook = App31.WorkBooks.Open(cy_Ass)
Dim Ws As MSExcel.WorkSheet = Wb31.WorkSheets("信息收集")
App31.ActiveWindow.view = MSExcel.XlWindowView.xlPageBreakPreview
Wb31.save()
Sleep (2000)
Dim kkki As Integer = 0
For irowH As Integer = 0 To drs.Count + 10
If kkki = 0 Then
try
If (Ws.HPageBreaks(irowH + 1).Location.Row - 1) < (drs.Count + 8) Then
If Names1.Contains(Ws.HPageBreaks(irowH + 1).Location.Row - 1) = False Then
Names1.Add(Ws.HPageBreaks(irowH + 1).Location.Row - 1)
End If
End If
catch ex As exception
kkki = 1
App31.Quit
End try
End If
Next
App31.Quit
If drs.Count > 1 Then
Names1.Sort
For i4 As Integer = 0 To names1.Count - 2
SheetSrh4.MergeCell(names1(i4),0,names1(i4 + 1) - names1(i4),3)
Next
End If
Book5.Save(cy_Ass)
End If
Dim BookRem As New XLS.Book(cy_Ass)
BookRem.Sheets.Remove("行高控制")
BookRem.Save(cy_Ass)