Dim Book As New XLS.Book '定义一个Excel工作簿 book.Sheets.Add("test1") book.Sheets.Add("sheet2") book.Sheets.Add("test2") For i As Integer = book.Sheets.Count-1 To 0 Step -1 If book.sheets(i).Name = "sheet2" Then msgbox(1) book.Sheets.RemoveAt(i) End If Next book.save("d:\123.xls")