Answer the question
In order to leave comments, you need to log in
How to force Excel 2010 to receive data via SOAP?
Now I am getting data from the Central Bank on banks in different regions. There is no single database for them, but there is a certain web service cbr.ru/scripts/Root.asp?Prtid=WSR . It explains how to load this data into Excel using SOAP Toolkit 3.0.
I couldn't get SOAP Toolkit 3.0 to work with Excel 2010 (didn't find all the required libraries) and I also sort of figured out that this data can be retrieved using MSXML2.XMLHTTP. Unfortunately, I didn't find an example.
Dear habravchan, please explain how to make Excel work with this data.
Answer the question
In order to leave comments, you need to log in
I used “MSSOAP.SoapClient30” for a similar task.
Below are a couple of links with examples of use:
second-ext.inttrust.ru/Site/itforum.nsf/all/C3F45FE47E7C77FEC32573AA004CD70B?OpenDocument
developer.textanywhere.net/v2/Samples/Sample_ASP-VB. aspx
here is an example: msdn.microsoft.com/en-us/library/dd819156%28v=office.12%29.aspx
Here is a specific usage example from the manual:
WEBAdress = "Тут адрес сервера"
WEBUser = "ЛОГИН"
WEBPass = "ПАРОЛЬ"
Set WEBObject = CreateObject("MSOSOAP.SoapClient30")
WEBObject.ClientProperty("ServerHTTPRequest") = True
'Указываем местонахождение файла с wsdl схемой сервиса на локальном ресурсе
WEBObject.MSSOAPInit "OFIS_OS_SOAP_CRM_MD.wsdl", "", "", ""
WEBObject.ConnectorProperty("EndPointURL") = WEBAdress
WEBObject.ConnectorProperty("AuthUser") = WEBUser
WEBObject.ConnectorProperty("AuthPassword") = WEBPass
WEBObject.ConnectorProperty("Timeout") = 90000
Set oXML = CreateObject("Microsoft.XMLDOM")
WEBRequest = "<IN_KODBP xmlns="""">999999</IN_KODBP><IN_KODSPR xmlns="""">2</
IN_KODSPR><IN_ZPARTNIN xmlns=""""/>"
Set Responce = WEBObject.OS_SOAP_CRM_MD( WEBRequest )
sReport = "c:\_WEBReport.txt"
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set oRep = oFSO.CreateTextFile(sReport, True)
oRep.WriteLine "Справочники"
oRep.WriteLine Responce.Item(0).XML
oRep.WriteLine "Код обработки"
oRep.WriteLine Responce.Item(1).XML
oRep.Close
WEBObject.ConnectorProperty("Timeout") = 900
Set oRep = Nothing
Set oFSO = Nothing
Set Responce = Nothing
Set oXML = Nothing
Set WEBObject = Nothing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question