[求助]我这段代码是查找excel中标签的但是执行不进去呀 Post By:2019/3/1 22:51:00 [只看该作者]
Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Dim ii As Integer = 0 Dim Rg As MSExcel.Range Dim rn As Integer = 1 For rn = 1 To 100 For j As Integer = 1 To 100 Rg = Ws.Cells(rn,j)
If Rg.text = "<End>" ii = ii + 1 MessageBox.Show(ii) End If If ii=2 Exit For End If Next If ii=2 Exit For End If Next Ws.Rows(rn+1).PageBreak = MSExcel.XlPageBreak.xlPageBreakManual