Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

Read Excel files into database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin - 30 Jul 2005 23:34 GMT
Hi, Guys

I got thousands of same format Excel files which needed to be imported into  
access, is there a code or tool can help me out? u quick response is trully
appreciated.

Thanks a lot!

Kevin
Ofer - 31 Jul 2005 00:05 GMT
Look at TransferSpreadsheet command line

docmd.TransferSpreadsheet
acImport,acSpreadsheetTypeExcel7,"TableName","FileName+Location"

> Hi, Guys
>
[quoted text clipped - 5 lines]
>
> Kevin
Marshall Barton - 31 Jul 2005 00:26 GMT
>I got thousands of same format Excel files which needed to be imported into  
>access, is there a code or tool can help me out? u quick response is trully
>appreciated.

You can not import entire files into an Access table, but
you can import well organized data from an area on an Excel
sheet to an Access table (see TransferSpreadsheet method in
Help).  You could create a VBA procedure to loop through the
files and use TransferSpreadsheet import the data.

It's also possible to write VBA code to construct SQL
statements that will retrieve an Excel Sheet or Named Range
and put it into a table.

Unlikely to be useful with thousands of files, bit it's not
absolutely necessary to import the data, you can link to a
sheet or named range instead.

All this is based on the sheet or range data being in a
nice, regular layout without extraneous stuff like notes or
totals in the middle of it.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.