Dim b1 As String = ProjectPath & "Attachments\在籍学生基本信息.xls" Dim b2 As String = ProjectPath & "Attachments\基本信息.xls" Dim f1 As String = ProjectPath & "Reports\在籍学生基本信息.xls" Dim f2 As String = ProjectPath & "Reports\基本信息.xls" Select Case _UserGroup Case "校长","教导处" Dim Book As New XLS.Book(b1) Book.Build() Book.Save(f1) Case "班主任" Dim Book As New XLS.Book(b2) Book.Build() Book.Save(f2) End Select Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) App.Visible = True Ws.PrintPreview App.Quit
|