在Sharepoint站点发布Excel工作簿 [英] Publishing an Excel Workbook in Sharepoint Site
问题描述
私人sc_Lists As SoapClient30
Public c_WSDL_URL As String
Private Const c_SERVICE As String =Lists
Private Const c_PORT As String =ListsSoap
Private Const c_SERVICE_NAMESPACE As String =http://schemas.microsoft.com/sharepoint/soap/
Private Sub Class_Initialize()
Dim str_WSML As String
str_WSML =
Set sc_Lists = New SoapClient30
c_WSDL_URL = glb_URL
sc_Lists.MSSoapInit2 c_WSDL_URL,str_WSML,c_SERVICE,c_PORT,c_SERVICE_NAMESPACE
sc_Lists。 ConnectorProperty(WinHTTPAuthScheme)=& H1
sc_Lists.ConnectorProperty(UseSSL)= True
sc_Lists.ConnectorProperty(AuthUser)=username
sc_Lists.ConnectorProperty(AuthPassword )=pass
End Sub
问题是当我打开excel文件和尝试发布它,然后它要求我的SharePoint网站的凭据,即使我已经提供了他们在代码中可以看到上面。我需要的是在发布时防止发出凭证。
我尝试使用VBA推送SP ;它只是脆弱和脆弱。我在工作中使用的一个解决方案是将SP站点映射为网络驱动器,并直接保存文件(如在这个UC教程中),从而避免这个问题。
I have an excel workbook and I need to publish it in a SharePoint site using Excel VBA. So I created a method in a module using the below code:
Private sc_Lists As SoapClient30
Public c_WSDL_URL As String
Private Const c_SERVICE As String = "Lists"
Private Const c_PORT As String = "ListsSoap"
Private Const c_SERVICE_NAMESPACE As String = "http://schemas.microsoft.com/sharepoint/soap/"
Private Sub Class_Initialize()
Dim str_WSML As String
str_WSML = ""
Set sc_Lists = New SoapClient30
c_WSDL_URL = glb_URL
sc_Lists.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE
sc_Lists.ConnectorProperty("WinHTTPAuthScheme") = &H1
sc_Lists.ConnectorProperty("UseSSL") = True
sc_Lists.ConnectorProperty("AuthUser") = "username"
sc_Lists.ConnectorProperty("AuthPassword") = "pass"
End Sub
The problem is when I open the excel document and try to publish it then it asks for the credentials of my SharePoint site even though I have provided them in the code as can be seen above. What I need is to prevent asking credentials when publishing.
I've had auth issues when attempting to push to SP using VBA; it is simply to fragile and finicky. One solution I've used at my work is instead to map the SP site as a network drive and simply save the file directly (like in this UC tutorial), thus avoiding this problem.
这篇关于在Sharepoint站点发布Excel工作簿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!