Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting excel worksheet to access table
"Narwe" wrote ...
I have an excel worksheet with defined columns that i need to export to a access database with identical column headings. I can get as far as importing my worksheet into a dataset, but im not really sure where to go from there. Don't use a Dataset. Instead use OleDb, the Jet 4.0 OLEDB provider and Jet's INSERT INTO..SELECT syntax e.g. INSERT INTO [Database=C:\MyJetDB.mdb;].MyTable (MyTextCol, MyIntCol) SELECT MyCol1 AS MyTextCol, MyCol2 AS MyIntCol FROM [Excel 8.0;HDR=YES;Database=C:\MyWorkbook.xls;].[MyWorksheet$] WHERE MyCol2 55 ; If you establish a connection to either the DB or spreadsheet you can omit the corresponding connection string in the query. Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exporting data to Excel pivot table from Access | Excel Discussion (Misc queries) | |||
excel worksheet export into access table | Excel Worksheet Functions | |||
exporting worksheet to access | Excel Discussion (Misc queries) | |||
Link Access table to Excel worksheet | Excel Discussion (Misc queries) | |||
Exporting excel worksheet to access table | Excel Programming |