Full Version: Export to existing excel sheet, without making a new 'tab'
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
warbuckle
Hello all

I wish to export to an existing spreadsheet, with formula and graphs already in place, however, when I do, the exported data is placed within a new tab within the spreadsheet. I'll assume I need to right code to specify the tab in the spreadsheet?


Will
Godders
I know that all your graphs are already in place, but have you considered using Data - Import External Data in Excel? Then when you open Excel you only need to use Refresh in the External Data toolbar.
Roger_Carlson
I assume you are using TransferSpreadsheet to export the data, correct?

On my website (www.rogersaccesslibrary.com) is a small sample database called " ExportToExcel.mdb " which illustrates how to do exactly this. There is also a 7 page document included which gives detailed explanation.

The trick here is that you have to have a Named Range in your data tab that is the same as the name on the tab. When you export to that name, then it will over-write the cells in that tab. The easiest way to create this named range is to delete your datatab, then export your data. It will create a new tab with the correct name AND the correct named range. The next time you export, it will find the right tab.
warbuckle
Godders

tried that, am getting error message, too few parameters, expected 2. The query in Access I have built requires start date and end date.


I'm considering a maketable query to pull the info I want, then import external data from within excel????........this way, once the values in the maketable query change the linked tab in Excel should update on open?

please correct me if I am wrong on this


Will
warbuckle
Roger

txs for the info, and yes that is the method I am using right now, did actually find your method with a google search, may have to resort to it yet.....

Will
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.