Toad World® Forums

Variable in filename


#1

Hi, I’m using TOAD Data Point 3.3 Trial (this needs to work before I buy :-)) and have problems using a variable in export to Excel filename. I must be doing something terribly wrong:TOAD Data Point problem.png

Any help would be highly appreciated!


#2

Hi,

Can you use the check box for in your screenshot on the Data Export Wizard window to add date/time to filename? The check box is Add Date/Time suffix to filename?

Rather than using a variable?

Alan

On Wed, Sep 25, 2013 at 3:37 PM, odewaart bounce-odewaart@toadworld.com wrote:

Variable in filename

Thread created by odewaart
Hi, I’m using TOAD Data Point 3.3 Trial (this needs to work before I buy :-)) and have problems using a variable in export to Excel filename. I must be doing something terribly wrong:variable between # remains text

Any help would be highly appreciated!

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad Data Point - General notifications altogether.
Toad Data Point - Discussion Forum

Flag this post as spam/abuse.


#3

Hi Alan,

Thanks, I know that works BUT… I need to comply to ‘yyyy-mm-dd-hh-mm-ss’, note the hyphen between days and hours. Adding the standard date time gives me nearly what I need, but not exactly.

I’m trying to follow what Debbie described in her blog #12 but I can’t get it to work…

Onno


#4

Hopefully this will work for you as it worked for me

Just place yyyy-mm-dd-hh-mm-ss in the date format field in the wizard ( see attached)

On Wed, Sep 25, 2013 at 3:54 PM, odewaart bounce-odewaart@toadworld.com wrote:

RE: Variable in filename

Reply by odewaart
Hi Alan,

Thanks, I know that works BUT… I need to comply to ‘yyyy-mm-dd-hh-mm-ss’, note the hyphen between days and hours. Adding the standard date time gives me nearly what I need, but not exactly.

I’m trying to follow what Debbie described in her blog #12 but I can’t get it to work…

Onno

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad Data Point - General notifications altogether.
Toad Data Point - Discussion Forum

Flag this post as spam/abuse.


#5

Just reviewed this and Hyphen between days and hours is still missing :frowning:

Almost there but not quite

On Wed, Sep 25, 2013 at 5:01 PM, alancounihan bounce-alancounihan@toadworld.com wrote:

Re: Variable in filename

Reply by alancounihan
Hopefully this will work for you as it worked for me

Just place yyyy-mm-dd-hh-mm-ss in the date format field in the wizard ( see attached)

On Wed, Sep 25, 2013 at 3:54 PM, odewaart bounce-odewaart@toadworld.com wrote:

RE: Variable in filename

Reply by odewaart
Hi Alan,

Thanks, I know that works BUT… I need to comply to ‘yyyy-mm-dd-hh-mm-ss’, note the hyphen between days and hours. Adding the standard date time gives me nearly what I need, but not exactly.

I’m trying to follow what Debbie described in her blog #12 but I can’t get it to work…

Onno

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad Data Point - General notifications altogether.
Toad Data Point - Discussion Forum

Flag this post as spam/abuse.

Attachments:
Capture.PNG

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad Data Point - General notifications altogether.
Toad Data Point - Discussion Forum

Flag this post as spam/abuse.


#6

Yeah, tried that before.

But leaving the actual date format alone, I want to understand how I can use a variable in the file name, as described in Debbie’s blog.

Thanks for your efforts!


#7

The Export Wizard does not support bind variables in the export path. Only the Select to File activity does. This is a feature we plan to add but it hasn’t been coded yet. You will need to use select to file activity OR use a copy/rename file activity after using the export wizard.

I added QAT-781 for this issue.


#8

Thanks Debbie! Using the Select to File activitiy I am indded able to use bind variables and now I get the filename I need. Excellent!

Problem solved. However…

I’m searching high and low but cannot find the Export options (available in Export Wizard and similarly shown in Debbie’s blog #12) to set the worksheet name:

Export Options in Wizard.png

All I seem to have is this, no option to set the worksheet name:

Select to File Options.png

I feel like I am asking silly questions but where can I find the Export Options? (this question also asked by elizabeth.wilsey_828 on 2013-09-20)

Again, help is highly appreciated!


#9

You are not asking a silly question. We took out this extra options in the select to file in version 3.3. You are not the only one that misses these options. We have a task to put these back in but it is not that easy and will not make this release. (QAT-556)

If you are an advanced user you might consider editing the Automation script manually. Open the tas file in notepad. Look for the “ExcelExportInstanceOptions” section. these are the options that go with the screenshot you are showing. They are still in the script but there is no UI for it anymore.

You can edit the script and export to a named worksheet by adding the attribute like below. Give that a try.

WorksheetName=“DATA”

<ns1:ExcelExportInstanceOptions FileDirctory=“C:\Users\dpeabody\Documents\ToadExport.xlsx” FileName=“ToadExport” FileOverwrite=“True” xmlns:ns1=“clr-namespace:Quest.Toad.ImportExport;Assembly=ToadCore, Version=7.0.0.1819, Culture=neutral, PublicKeyToken=c862883b2ae69822”>
ns1:ExcelExportInstanceOptions.FormatSettings
<ns1:FormatSettings FormatType=“ExcelFile” ExcelAfterExportMacros="{x:Null}" QuoteChar="’" Column=“0” FolderImportDirectory="{x:Null}" BlockInsertValue=“500.0” HeaderBackColor=“LightGray” FileExtension=“xlsx” WorksheetName=“DATA” Row=“1” ExcelBeforeExportMacros="{x:Null}" FileFilter=“Excel (2007) Files (.xlsx)|.xlsx | Excel (.xls)|.xls” Delimiter="," ExcelAtLocation="{x:Null}" />
</ns1:ExcelExportInstanceOptions.FormatSettings>
</ns1:ExcelExportInstanceOptions>


#10

Thanks Debbie.

Editing the script is far from beautiful, but it works! I’ll use that for my daily exports.

Cheers