Subscribe Bookmark RSS Feed

Concatenating two databases from the same Excel Spreadsheet

Hello all,

I tried concatenating two databases from the same excel spreadsheet multiple times, but was unable to do so. Does anyone have any suggestions?
5 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

Are you trying to do the concatenation via scripting? Or are you having trouble concatenating them even manually through the table menu?
Via scripting, I can see easily enough how to do it manually, but writing a script has eluded me.
mpb

Super User

Joined:

Jun 23, 2011

The code in this post has been superceded by the next one

Here's a rough starting example which assumes the user selects exactly 2 sheets from the .xls file.

mpb

Super User

Joined:

Jun 23, 2011

I was reminded of the fact that Data Table(1) corresponds to the most recent data table, Data Table(2) to the next most recent and so on. This makes my previously posted snippet work correctly only if there are no other open tables when it is run. Here is one that should work correctly even if there are other tables open. It still requires work to make it robust to other possibilities.
Thank you very much for the reply! As soon as I have a chance to try this out, I will, and I'll let you know how it works for me.