Link to home
Start Free TrialLog in
Avatar of Satish Auti
Satish AutiFlag for India

asked on

Excel report for memory, CPU and disk utilization report

Hello,

I have an script which gives me output of memory, CPU and disk utilization in excel. Whenever I run the script it gives output in different new file.
I want report should get generated in single file for multiple run times. So that I can take average utilization report for all these items.

Is there any way to modify the script to append this data in single file?
Avatar of #AKS#
#AKS#
Flag of India image

Could you please share the script you use, it will be easy to understand and propose the solution.

Thanks
Avatar of Satish Auti

ASKER

File attached.
Checklist1.vbs
SOLUTION
Avatar of Gerald Connolly
Gerald Connolly
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok .. it is clear that code is already written there to edit the existing excel but its not happening.

Set objFSO=CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(mth) Then
      Set objExcel=CreateObject("Excel.Application")
      Set objWorkbook=objExcel.WorkBooks.Open(mth)
      Set objWorkbook=objExcel.ActiveWorkBook.WorkSheets("Sheet1")
      i=objExcel.Cells(250,250).Value
      count=objExcel.Cells(250,251).Value
Else
      Set objExcel=WScript.CreateObject("Excel.Application")
      Set objWorkbook=objExcel.Workbooks.Add()
      Set objWorkSheet=objWorkbook.Worksheets(1)
      i=2
      count=1

How do I set a name for excel file in script as it's automatically taking name depend upon a what time it runs like below. See the pic.
User generated image
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Simple mod to script