Export Dataset to Excel File %VARIABLES%

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?

they should all work. which one does not?

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!

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.

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.

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

Thanks a bunch! So I'm using 13.2.0.258 (64-bit), and this feature is working perfectly with:

%ACTIVESESSIONDB%.%ActiveEditorTabCaption%

1 Like

This no longer seems to work, using version 13.3.0.181 64-bit. Is there a different convention now, or was the feature removed? An example of somebody else asking about this feature in the wild: https://stackoverflow.com/questions/60429135/toad-automation-designer-export-to-excel-utilizing-variables

Sorry for the delay - I just noticed this.

%ActiveEditorTabCaption% works in the file name, but it looks like we don't support variables in the Excel Sheet Name field. I can add that for next version.