Hi Can i know how to place result data in excel file as attachment by executing the SQLQuery, not creating any table in Database and send notification to user
Moved to CA Automic Community for further assistance.
Automic Automation Engine has no built-in facilities for generating Excel files.
You can send mails, including reports, via call objects, or via Automation Engine script, or via calling an external MTU such as sendmail, Postfix, or Powershell. I'm quite sure if you search the forums, you can find specifics about how to send reports via call objects.
You can query the Automic DB for reports with command line database clients, though you'd have to piece the reports together yourself since the Automic DB is not originally designed to be parsed readily by the user. You can probably create Excel files from any input text by using Powershell, should your question happen to concern Windows as a platform.
Beyond that, since you didn't tell us anything about your platform, and quite frankly the details of what exactly you're trying to do still elude me from your original text, these are just some pointers which I hope can point you in the right direction.
One way is to spool the data from SQL query. Below is a sample example. Keep everything in a .SQL file and run it.
set markup html onset feedback offset lines 250 pages 500set colsep " "SET TRIMSPOOL ONspool OUTPUT.xls
I somehow doubt calling it an .xls file makes it an Excel file. Isn't this just writing something like a csv (but separated by spaces) which Excel will somehow import?
Furthermore, I don't know which DBM the OP is on, if he's on MS SQL, this will likely not work this way.
True, we are using Oracle DB with SQLPLUS so it is working just fine for us.
Thank you Carsten and Bharath for your valuable replies.
@Bharath,we are using SQL plus only and by any chance can you help with the screenshots related to solution for this issue which will be much helpful for me.
I've already given the whole sequence. Just update the SQL and try to run it.
I would suggest creating a .CSV file thats very simple and can beopened easily in Excel.
To create it its just 2..5 lines script.
You can use following Script commands to fulfill your request:
Just to throw another option onto the fire, in addition to the solutions mentioned above we have also successfully applied the AE DB Reporting Tool (UCYBDBRT) to some of our reporting needs from the AE system itself. It is a batch reporting tool supplied and supported by the vendor that can either write out the report in HTML format or CSV format, the latter being Excel-friendly.
V11.2 Documentation; Automic
Retrieving data ...