用vb.net编写的asp网站怎么导出EXCEl数据报表?我把vb.net的代码如下:
 DS3 = New DataSet
            Sqlstr = "select *  from table"            MyCommand = New System.Data.SqlClient.SqlDataAdapter(Sqlstr, MyConnection)
            MyCommand.Fill(DS3)            MyConnection.Close()            Dim xlApp As New Excel.Application
            Dim xlBooks As Excel.Workbooks = xlApp.Workbooks
            Dim xlFilePath As String = System.AppDomain.CurrentDomain.BaseDirectory.ToString() & "汇总表.xls"     
            Dim xlBook As Excel.Workbook = xlBooks.Open(xlFilePath)
            Dim xlSheets As Excel.Sheets = xlBook.Worksheets
            Dim xlSheet As Excel.Worksheet = xlSheets.Item(1)
                      xlSheet.Range("A3:U332").HorizontalAlignment = -4108
            '清空旧数据
            xlSheet.Range("A3:U336").Cells.ClearContents()
            Dim j As Integer
            For j = 0 To DS3.Tables(0).Columns.Count - 1
                xlSheet.Cells(3, 1 + j) = DS3.Tables(0).Columns(j).ColumnName
            Next
            If DS3.Tables(0).Rows.Count > 0 Then
                For i = 0 To DS3.Tables(0).Rows.Count - 1
                    For j = 0 To DS3.Tables(0).Columns.Count - 1
                        xlSheet.Cells(4 + i, 1 + j) = DS3.Tables(0).Rows(i).Item(j).ToString
                    Next
                Next
            End If            xlApp.DisplayAlerts = True
            xlSheet.Application.Visible = True
            xlApp.Quit()
            xlSheets = Nothing
            xlBooks = Nothing
            xlApp = Nothing
“汇总表”放在App_Data目录下面,第一次用vb.net做asp网站,请高手帮帮忙,谢谢