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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing multiple data ranges from excel

Status
Not open for further replies.

Taz66

Technical User
Sep 5, 2003
1
US
I'm trying to find an easy way to automatically import multiple data ranges into my database without copy and paste into a new excel tab with the data I need. I'm currently using DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Table_Name", filename, True, "Tab!A1:C20" which is fine to import a full range. What I need is data from say, Tab!A1:A20, Tab!C1:C20, Tab!F1:F:20. Is this possible?

TIA
 
Taz,

I'm not 100% certain, but i think you would have to define the individual range names first and then run the TransferSpreadsheet method for each one.

If your smaller ranges are the same each time, you could program Excel to set them prior to the import.

Hope this helps.

Leigh Moore
LJM Analysis Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top