¤
¤ Can you teach me how to export access file to excel file
¤ in VB.net?
You can do it a table at a time:
Public Sub ExportToExcelFromAccess()
Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;"
& _
"Data Source=e:\My Documents\db1.mdb")
AccessConn.Open()
'New sheet in Workbook
Dim AccessCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Excel
8.0;DATABASE=e:\My Documents\Book11.xls;HDR=NO;].[Sheet7] from [Table7]", AccessConn)
AccessCommand.ExecuteNonQuery()
AccessConn.Close()
End Sub
Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)