Worksheet import

gblack

Registered User.
Local time
Today, 09:47
Joined
Sep 18, 2002
Messages
632
When I am importing and Excel Spreadsheet, how do I tell MS Access that I want a specific worksheet from said spreadsheet?

I am using:

DoCmd.TransferSpreadsheet acImport, 8, "Spreadsheet", "J:Reports.xls", True, ""

To import the spreadsheet, but it only allows me to import the first worksheet and I want to import the second.

Thanks for your help...
G
 
DoCmd.TransferSpreadsheet(TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA)

For the Range argument, write the sheet name, i.e... "Sheet4"
 
I have a similar problem, but the sheets are all named with account numbers (not sequential). Is there any way to refer to the sheet by position? How about a For Each Sheet loop? How would that work (if it is possible to do that)?
 

Users who are viewing this thread

Back
Top Bottom