Toad World® Forums

Export Dataset to Excel File %VARIABLES%


#1

Some variables, such as %ACTIVESESSIONDB% also work in the "Sheet name: " textbox (useful!) Can this inconsistency be fixed so that all variables also work in the "Sheet name:" textbox?


#2

they should all work. which one does not?


#3

Thanks for verifying that they should work. %ACTIVEEDITORFILE% was not working for me. I tried this now in a different version of Excel, and can see the substitution correctly. Now that I see it in action, can I request:

  • have it work for anonymous tabs like "New 1" etc?
  • have it work without the full path, just filename without extension?

Those would greatly assist with automating some reports!


#4

So, I've been chatting with another developer on this. We could add a new variable that would give you the caption of the active editor tab (New 1, filename w/o path, or whatever you set it to by right-click -> Rename).

But what we don't get is how this would tie in with automation. Toad's automation designer can export data to excel, but the query is defined in the export action in the automation designer. Editor isn't part of that picture. Only reason I bring this up is just to understand your requirement and make sure this change will solve it.


#5

Cool, thanks for considering this feature. I don't mean automation in the Toad vernacular, but rather how we here have certain conventions for naming/processing stuff. I am rather new to Toad myself and am still discovering all the many features.


#6

Next beta and 13.2 will have a new variable called ActiveEditorTabCaption. It will return whatever text is shown in the active editor tab. Also I added some code in there to replace any character that Excel won't like in the sheet name with an underscore. So "New 1*" will become "New 1_"

The screen shot shows the text that I'm referring to as "active editor tab caption" You can change it by right-click -> Rename Tab.

image