-
Import excel spreadsheet to access97 database
Hi!!
I wonder if it is possible to import data from an excel spreadsheet into
a normalised access97 database with alot of tables in a way that the data
in the spreadsheet will be inserted into the correct tables in the database?
and if so, how? I have been trying to use an ASP-script with not much success.
/Martin
-
Re: Import excel spreadsheet to access97 database
On 1 Aug 2001 06:21:29 -0700, "Martin S" <martinsz@hotmail.com> wrote:
¤
¤ Hi!!
¤ I wonder if it is possible to import data from an excel spreadsheet into
¤ a normalised access97 database with alot of tables in a way that the data
¤ in the spreadsheet will be inserted into the correct tables in the database?
¤ and if so, how? I have been trying to use an ASP-script with not much success.
¤
¤ /Martin
I don't know the structure of your Excel Workbook you can import using SQL and DAO or ADO.
Sub ExportExcelToAccess()
Dim cnn As New ADODB.Connection
Dim sqlString As String
cnn.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=D:\My Documents\db1.mdb;" & _
"Jet OLEDB:Engine Type=4"
sqlString = "SELECT * INTO [tblExcel] FROM [Excel 8.0;DATABASE=D:\My
Documents\Test.xls].[Sheet1$A3 7]"
cnn.Execute sqlString
End Sub
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks