Unsolved
This post is more than 5 years old
9 Posts
0
6937
How to add script to exploit excel report - DPA
Hello everybody,
I sent report everyday by mail thanks to DPA : it is "Backup job summary"
this report is an excel (attached), so when users received the mail they have for example this result :
,Object,VMs / SITE,Succeeded,Failed,Total Size (GB),Success Rate (%)
,friti::/vc03.corp.com/VirtualMachines/UNIX/NTE,70,64,6,18,"91,429"
,friti::/vc03.corp..com/VirtualMachines/WINDOWS/NTE,153,93,60,26,"60,784"
,friti::bvc.corp.com/VirtualMachines/UNIX/GRE,50,30,20,12,60
The result is'nt very understandable for users. I would like to add post-script before sent mail to users. I think we can do it, but I don't know how to do it.
Someone has already did that ? Someone know how to do it?
Thanks.
Sariaka
DavidRussell1
141 Posts
0
February 1st, 2013 06:00
Hi Sariaka,
Yes DPA does provide the option for you to apply a post-processing script to the generated scheduled report. The steps would be:
- write your post-processing script to format the data as you require
- in the DPA UI select Tools, Scheduled Report Editor, open the scheduled report in question and then enter the location and name of the post-processing script into the post-processing script field in the Advanced tab
Alternatively DPA provides other output options other than csv which may be better suited to your users (i.e. html)
Thanks
David
David Russell
EMC
sariaka
9 Posts
0
February 1st, 2013 07:00
Hi David,
Thank you very much.
I would like to convert the ";" to table
I'm not very strong to write scripts. Have you an example of script for me please?
In effect, users want backup of the report, they need csv format :-(
Thank you
Sariaka
DavidRussell1
141 Posts
0
February 1st, 2013 07:00
Hi Sariaka,
Unfortunately we don't have any examples of scripts.
Thanks
David
David Russell
EMC
sariaka
9 Posts
0
February 5th, 2013 03:00
Hi David,
I found a script to delimite csv file to table.
In order to insert the script into the report :
I have to write the path at the "Pre-Processing Script" or "Post-Processing Script" ?
Thank you.
Regards,
Sariaka
DavidRussell1
141 Posts
0
February 5th, 2013 03:00
Hi Sariaka,
You would need to insert it into the post-processing script field.
Thanks
David
David Russell
EMC
sariaka
9 Posts
0
February 5th, 2013 04:00
For the test, I specify this path in advanced :
C:\Program Files\EMC\DPA\webapps\root\reports\convert_tableau.vbs
with default template
in basic Publication method :
Report Format : Comma Separated Values (csv)
Publish via : File
File name : Sauvegarde Avamar Agents
Thanks
regards,
Sariaka
DavidRussell1
141 Posts
0
February 5th, 2013 04:00
Hi Sariaka,
The picture has not come through in the post. Please could you let me know what path you specify in the post-script field?
Thanks
David
David Russell
EMC
DavidRussell1
141 Posts
0
February 5th, 2013 04:00
Hi Sariaka,
What you have configured appears to be correct. At this stage I would recommend raising a support case via EMC Powerlink. The DPA support team can then investigate to make sure the product is correctly trying to run the script. When you raise the case please attach a copy of the publisher.log from the DPA server as this should contain any error messages when trying to run the script.
Thanks
David
David Russell
EMC
sariaka
9 Posts
0
February 5th, 2013 04:00
I think DPA don't considere my script. It's a vbs script like that :
Const xlDelimited = 1
Const xlNormal = -4143
Dim CurrentPath : CurrentPath = LCase (Replace (WScript.ScriptFullName, WScript.ScriptName, "")) 'Current path
Dim Excel
Dim myDateString
myDateString = Replace (Date(), "/", ".")
Set Excel = CreateObject("Excel.Application")
With Excel
.Workbooks.Open CurrentPath & "\Sauvegarde Avamar Agents.csv"
.Sheets(1).Columns("A").TextToColumns .Range("A1"), xlDelimited, , , , True 'semicolon-delimited
.ActiveWorkbook.SaveAs .ActiveWorkbook.Path & "\Sauv_Avamar_DD_sites-" & myDateString & ".csv", xlNormal
.Quit
End With
I specify the path as you tell me, but nothing change :
Thanks a lot
Sariaka
1 Attachment
DPA1.PNG
sariaka
9 Posts
0
February 5th, 2013 05:00
OK thank you very much David.
Regards,
Sariaka
f25
15 Posts
0
October 26th, 2018 03:00
Hi,
I suppose the script needs to be *.bat
Perhaps You need to move all things around to a different directory, like:
C:\Scripts\
Then in DPA post-processing provide:
C:\Scripts\MyScript.bat
That will contain a call to the VBS one.
Additional tip:
For the reports that are written as files (so not send via e-mail), the first parameter that is passed to the called post-processing script is path of the report.
Good luck!