首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Avaya CMS报告到excel vba

Avaya CMS报告到excel vba
EN

Stack Overflow用户
提问于 2018-06-16 00:25:57
回答 1查看 3.9K关注 0票数 0

我有一个从Avaya CMS中提取数据的excel报告,但是他们将Avaya CMS应用程序从我的工作站移动到了RD Web访问。现在VBA不再工作,因为安装在我的工作站上的旧CMS现在处于RD web访问中。是否可以通过RD web访问Avaya CMS,以便通过VBA将报告提取到excel?

提前感谢!!

代码语言:javascript
复制
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中。

EN

回答 1

Stack Overflow用户

发布于 2018-06-16 01:35:18

我使用Avaya CMS已经七年多了,但我使用CMS Supervisor来设计报告。你能拿到这个吗?如果是这样的话,您应该能够编写一个简单的报告来提取所需的数据。我去看看能不能找到我的老向导。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50879511

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档