Toad World® Forums

Format Excel Report for Emailing


#1

Hi,

I am running a simple automated process that queries an OracleDatabase, sends the result set to Excel and then emails the Excelreport to end users. I would like to use Excels conditional formatting, or even some simple formatting in this Excel report. After updating the Excel report, all formatting is lost upon subsequent executions of the automated process.

Is there a way to preserve the formatting? Perhaps using an Excel template ?

Thanks,
Ben


#2

You are probably using the SelectToExcel automation activity. This creates a new Excel file with just the data. I believe if you use the Export Wizard you can export your data directly to an existing file and cell location. This existing file can be a template with your formatting.

Debbie


#3

Hi Debbie,

I was indeed using the SelectToExcel function.

I have found appending the date to the file, ensures the formatting is not preserved. A rename file, or the ability to copy the file and add a timestamp would be useful.

Thanks for your assistance Debbie!

Regards,
Ben


#4

Hi Debbie,

I was a bit too quick today with my replies, as I have since found the functions that almost meet my requirements.

I have change to use the export function and then a copy file function to append the current date.

The email function in the attachment property uses exact filenames. Is the tool smart enough to pick up the new file name as the date changes ?

Thanks,
Ben


#5

The ability to attach files that are dynamically named during a script execution is an enhancement I just added and will be in the next Beta.

Debbie


#6

Hi Debbie,

Thanks for the responses.

The tool works in a similar fashion to BPEL or Process management tools. It would be nice if one function can pass its “payload” to the next function.

So if I copy a file, the zip function picks this up and zips the correct file. (I suspect zip function would face a similar issue as the email function with dynamic filenames.) If the email function comes after zip, then it should know to email the zipped, newly renamed file (from the copy function).

I’m already looking forward to seeing this in a future release.

Thanks,

Ben


#7

Has this been rolled out yet?


#8

All of the items mentioned in this email will be available in Toad for Data Analysts 2.5. It is due to be released in the next couple of weeks. If you are using the Beta there are currently include.
Enjoy.

Debbie