gpt4 book ai didi

vba - SAS VBA 连接

转载 作者:行者123 更新时间:2023-12-02 12:13:50 27 4
gpt4 key购买 nike

我尝试通过 VBA 运行 SAS 代码。我在服务器上运行 SAS。我有一个测试 SAS 程序“Program1.sas”,我将其保存在服务器上。下面是我使用过的VBA代码。 SAS 代码正在运行,但输出数据集仅显示列标题且行为空。任何人都可以帮助我可能的原因是什么。

Sub Form_Load23()
Dim obObjectFactory As New SASObjectManager.ObjectFactory

Dim obObjectKeeper As New SASObjectManager.ObjectKeeper

Dim obServer As New SASObjectManager.ServerDef

Dim obSAS As SAS.Workspace

Dim cn As New ADODB.Connection

Dim rs As New ADODB.Recordset

obServer.MachineDNSName = "xyz"

obServer.Protocol = SASObjectManager.Protocols.ProtocolBridge

obServer.Port = 8871



obObjectFactory.LogEnabled = True

Set obSAS = obObjectFactory.CreateObjectByServer("sas", True, obServer,"userid", "password")


obSAS.LanguageService.Submit ("options source2; %include '/abc/AFP/shikhar.gupta1/amg/**Program1.sas**';")

End Sub'

最佳答案

我相信您必须更改 Excel 中的安全设置。找到安全设置和 protected 查看。删除所有复选标记。

关于vba - SAS VBA 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31481071/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com