Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Excel files

Status
Not open for further replies.

newbie2181

Technical User
May 27, 2003
77
0
0
GB
Hi,
I am using a very in-flexible piece of software that produces a report in an xls file. I want to automate importing this file into a database. I have tried to set up an import spec but i am finding that i don't have the advanced options availible to me because i'm using an XLS file. Is there any way around this problem

Thanks a lot

Dan
 
Have a look at the TransferSpreadsheet method in Access help. It is reasonably flexible in the sense that you can choose to import particular ranges, etc.

-Gary
 
newbie 2181- If you still need help just tell us your .xls file name (and the range on the file if applicable) and we can walk you through it.

Phil
 
Here's another suggestion is to have to build some code to search the folder for the files you are looking for and then import it using the transfertext method. Here's an example.

DoCmd.TransferText acImportDelim, <specification>, <table>, <file with full path>, False


The specification contains the specs about the fields in your xls file if you do not have any column headings. It's easy to build one based on how each of your fields are formatted in the xls file.

-Laughter works miracles.
 
Hi,
Sorry i haven't replied to your replies sooner but i have been away. I have tried using TransferText but do i not need to specify a specification file to tell access how to import the data? The problem being that i can't create a specification file for an XLS file? Probably wrong here but if any one can help me out here it would be great!!

Thanks

Dan
 
And what problems did you experience with the TransferSpreadsheet method?


-Gary
 
I can't create the specification file to tell access how to import the data
 
newbie2181,

If you can manually import the data into the table then you should be able to export the specifications as well. Then what you do is just use the same specification for importing.
 
how do i export the settings then i don't get the advanced button that you normally get?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top