A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro to Export Query Data to Excel Spreadsheet



 
 
Thread Tools Display Modes
  #1  
Old October 30th, 2008, 02:20 PM posted to microsoft.public.access
Sara
external usenet poster
 
Posts: 261
Default Macro to Export Query Data to Excel Spreadsheet

Hello,

I have read through a number of threads and have tried the suggested methods
but I still can't seem to get this to work. I am trying to create a Macro
(using TransferSpreadsheet) to export data from a query to an Excel
Spreadsheet. I would LIKE it to dump the data into an already create
worksheet but I can't get it to.

The name of the query is "B001 PSA". I created a brand new workbook
formatted the way I want and named the tab B001. I have tried putting "B001!"
in the Range column and it tells me "B001'$'" already exists. If I leave the
"!" off, it just creates a new worksheet titled "_B001". I even tried putting
B001!A:H and it tells me those cells already exist. I tried naming the
worksheet tab "B001_PSA" but then it creates "B001_PSA1".

Is this possible or am I stuck manually formatting the Excel spreadsheet?

Btw, I'm using Office 2007.

Thanks!

-Sara
  #2  
Old October 30th, 2008, 09:13 PM posted to microsoft.public.access
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Macro to Export Query Data to Excel Spreadsheet

Hi Sara,

Untried: Mybe go about it in reverse. How about creating a macro in
the Excel document to clear out the current data and reimport it?

Clifford Bass

"Sara" wrote:

Hello,

I have read through a number of threads and have tried the suggested methods
but I still can't seem to get this to work. I am trying to create a Macro
(using TransferSpreadsheet) to export data from a query to an Excel
Spreadsheet. I would LIKE it to dump the data into an already create
worksheet but I can't get it to.

The name of the query is "B001 PSA". I created a brand new workbook
formatted the way I want and named the tab B001. I have tried putting "B001!"
in the Range column and it tells me "B001'$'" already exists. If I leave the
"!" off, it just creates a new worksheet titled "_B001". I even tried putting
B001!A:H and it tells me those cells already exist. I tried naming the
worksheet tab "B001_PSA" but then it creates "B001_PSA1".

Is this possible or am I stuck manually formatting the Excel spreadsheet?

Btw, I'm using Office 2007.

Thanks!

-Sara

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.