Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, January 9, 2014 3:47 AM
Hi
Does anyone have a working example of connecting to and querying a Sharepoint list using Excel VBA instead of access database?
thanks in advance
nain1987
All replies (5)
Thursday, January 9, 2014 6:14 AM ✅Answered
Hello,
How about lists.asmx web service? Pass the input value in query fields to get specific data:
https://skydrive.live.com/?cid=c0f61214d82ac938&id=C0F61214D82AC938!271&authkey=!AFUOiFwECebXcpY
http://sharepoint.stackexchange.com/questions/29021/import-sharepoint-list-into-excel-using-vba-only
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help
Friday, January 10, 2014 3:40 AM ✅Answered
I dont see why you can't
Since you have input fields in VBA form already, you can just pass them to list.asmx web service
Just treat list.asmx as any SOAP web services, so long it's supported by the API, can you pass anything to it according to the method signature.
Regards, Patrick Yong http://patrickyong.net
Thursday, January 9, 2014 3:55 AM | 1 vote
You have to use the SoapClient to access SharePoint web services
I dont know any webpage or code example, but you can take a look at the following 2 links
-VBA SoapClient
Set osoap=CreateObject("MSSOAP.SoapClient")
oSoap.ClientProperty("ServerHTTPRequest") = True
oSoap.mssoapinit("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL")
result=oSoap.FahrenheitToCelsius(30)
WScript.Echo result-This is a link to SharePoint List web serviceshttp://msdn.microsoft.com/en-us/library/lists.lists.getlistitems(v=office.12).aspx
Regards, Patrick Yong http://patrickyong.net
Thursday, January 9, 2014 4:14 AM
Thanks
but can we query the sharepoint list directly using soap services based on user input data vba form ?
nain1987
Thursday, January 9, 2014 4:21 AM
there are button click events as well on button click we need to manipulate the list using vba execl script?
nain1987