簡體   English   中英

Avaya CMS向Excel VBA報告

[英]Avaya CMS report to excel vba

我有一個Excel報告,該報告從Avaya CMS提取數據,但是他們將Avaya CMS應用程序從我的工作站移至RD Web訪問。 現在,VBA不再工作,因為安裝在我的工作站上的舊CMS現在位於RD Web訪問中。 是否可以通過RD Web訪問訪問Avaya CMS,以提取報告以通過VBA脫穎而出?

提前致謝!!

Sub GetIntervalData()

Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object

Dim Info As Object, Log As Object, b As Object

Set cvsApp = CreateObject("ACSUP.cvsApplication")
'Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsserver")
Set Rep = CreateObject("ACSREP.cvsReport")

'Clear Data
Sheets("Domestic Interval Data").Select
Range("A1:AR300").ClearContents

Sheets("Domestic").Activate

serverAddress = Range("B1").Value
UserName = Range("B2").Value
Password1 = Range("C2").Value

If cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn) Then

If cvsConn.Login(UserName, Password1, serverAddress, "ENU") Then

On Error Resume Next

   cvsSrv.Reports.ACD = 1
   Set Info = cvsSrv.Reports.Reports("Historical\Designer\APS Report (MultiSkill)")

   If Info Is Nothing Then
      If cvsSrv.Interactive Then
          MsgBox "The report Historical\Designer\APS Report (MultiSkill) was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
      Else
          Set Log = CreateObject("ACSERR.cvsLog")
          Log.AutoLogWrite "The report Historical\Designer\APS Report (MultiSkill) was not found on ACD 1."
          Set Log = Nothing
      End If
   Else

       b = cvsSrv.Reports.CreateReport(Info, Rep)
       If b Then

          Rep.Window.Top = 75
          Rep.Window.Left = 690
          Rep.Window.Width = 19140
          Rep.Window.Height = 11400

                  Rep.TimeZone = "default"

         Rep.SetProperty "Split/Skills","1555;1551;1552;1553;1554;1570;1998;1999"

         Rep.SetProperty "Dates", "2/14/2018"

          Rep.SetProperty "Times", "00:00-23:30"

          b = Rep.ExportData("", 9, 0, False, False, True)

          Rep.Quit

              If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
          Set Rep = Nothing
       End If

   End If
   Set Info = Nothing

End If

cvsApp.Servers.Remove cvsSrv.ServerKey
cvsConn.Logout
cvsConn.Disconnect
cvsSrv.Connected = False

Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing

Sheets("Domestic Interval Data").Select
Range("A1").Select
ActiveSheet.Paste

End If

Sheets("Domestic").Activate

End Sub

**此代碼創建avaya cms會話並運行報告,將其提取並直接粘貼到excel

自從我使用Avaya CMS至今已有七年多了,但是我一直使用CMS Supervisor來設計報告。 您可以訪問嗎? 如果是這樣,您應該能夠編寫一個簡單的報告來提取所需的數據。 我將看看是否能找到我的舊指南。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM