Link multiple spreadsheets

Scadadude

New member
Local time
Today, 04:19
Joined
Nov 12, 2008
Messages
9
Probably simple for the pros again. I have several spreadsheets that are all built the same however the data changes on them everyday. I am wanting to either import or link the one worksheet from each of the spreadsheets into one table in ACCESS. How can I do this in one fatal swoop?

Thanks
Scadadude
 
The only way, I think, to maintain live data is to link each worksheet individually then create a union query of all the linked worksheets and use that for you needs.

David
 
DCrake's answer about linking is probably the easiest.

Just for comparison, here is the next-harder method:

Make a list of the fully qualified file specs for every spreadsheet.

Then write some VBA code that does a TransferSpreadSheet routine (which you can find in Access Help) once for each entry in the list of spreadsheets. Note that if you manually import a spreadsheet, you can save the "Import Specs" and use them in that TransferSpreadSheet routine's call sequence.

Then have the same VBA code run some sort of updating query from the table to which you imported your spreadsheets.

Bells and whistles would include something to pre-erase the receiver tables and to erase the temporary import table between import actions.

There is a third level, using that list to do automation to crate an Excel Object, open the workbooks in turn, and write some nested loops to pull out values from the cells you want, storing same into a recordset that is open as long as any workbook is open.

Of the three levels of effort, DCrake's is far easier than either of the other two. If for some reason you find that you really NEED to step to level 2 or 3, post back here for more questions.
 

Users who are viewing this thread

Back
Top Bottom