Transfer to different sheet in same excel file

J

Juan

Hello,
not sure if this can be done, but I have a macro to
transferspreadsheet to excel. My query prompts the user to
type region. Example AP,JP,NA.EU. So it sends to excel,
but if I want to run the macro for separate region, it
will replace the excel sheet. Is there a way to append to
different sheet? I want to run the macro for all regions
but in a separate sheet to get inserted.

Please advise if there is a way.

Thank you,

Juan
 
N

Nikos Yannacopoulos

Juan,

The last argument of the TransferSpreadsheet action is Range; if you type
something there, your query output will be exported to a sheet named after
it. That is t say, if you run the TransferSpreadsheet action repeatedly
specifying the same Excel workbbox but changing the Range string, you will
get all the outputs in the same workbook on different sheets.
By the way, the same goes for the TransferSpreadsheet method in VBA.

HTH,
Nikos
 
J

Juan

Hello Nikos,
sorry fot the late reply. Just wanted to thank you.

Appreciated the help thanks,
Juan
 

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