Importing all tabs from a spreadsheet!

F

Fatz

I am trying to import a excel spreadsheet into Access through a button
with the following code:

strFilename = "\\boston07\shardata\settlement\wireroom\MTS-PL
Proof\ETExtract\eticket.xls"
DoCmd.RunSQL "INSERT INTO tbleticketing SELECT [eticket$].* FROM
[Excel 8.0;database=" & strFilename & "].[eticket$]"

The eticket fields above are the names of the tab on the spreadsheet I
want to import. The problem is the name always changes everytime you
save the file. How can I code this to grab all the tabs in the
spreadsheet and not just the eticket tab??

I appreciate any help you can give me!

Thanks,
Chris
 
S

StCyrM

Hi Chris

What I do is I just link the spreadsheet to my database, that way the data is
always available. You simply have to 'refresh' your other tables as required.

Maurice
 

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