Possible to import a specific sheets data from excel into access?

D

Doug

I have a spreadsheet with two sheets. SheetA and SheetB.

I'm using the transferspreadsheet method to import data from that
spreadsheet into Access tables. It works fine for SheetA as it's the first in
the hierarchy.

Transferspreadsheet asks for a range as one of its arguments. Can I amend
that range to pick up sheetB's contents? I know how many columns of data are
in it, but never how many rows....

I've tried :

DoCmd.TransferSpreadsheet acImport, , "Temp", sDir & "Jobs_Per_Prop", True,
"sheets!sheetb"

but that doesn't work and I'm struggling to think of a way to do it.

Is this possible or not? If not, I can split up my spreadsheet.
 
K

Ken Snell

DoCmd.TransferSpreadsheet acImport, , "Temp", sDir & "Jobs_Per_Prop", True,
"sheetb$"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top