Forum Discussion
Sachin Jain
Sep 23, 2023Brass Contributor
Webservice function not working in Excel and generating #VALUE error after launch of python in excel
Ever since Python in Excel is launched, Webservice() function is not working in excel and generating #VALUE error. Is there any update on this ? Today i got update in Office 365 but still not fixed....
JerryDNYC
Oct 11, 2023Copper Contributor
Sachin Jain I got fed up waiting for either a fix or a response from Microsoft, so decided to write a VBA function to use instead.
Function WebSvc(sURL As String) As String
Dim XMLHTTP As Object
' Create an XMLHTTP object
Set XMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")
' Fetch the data
With XMLHTTP
.Open "GET", sURL, False
.send
WebSvc = .responseText
End With
' Clean up
Set XMLHTTP = Nothing
End Function
A quick FIND/REPLACE of WEBSERVICE with WebSvc fixed my problem.
I'd much rather not have to use a Macro Function, but it works!
I'm not that well versed in VBA, but be aware that I'm using 64 bit Excel. I don't know if it makes a difference here, but I am aware that sometimes the code could be different for 32 bit Excel. Reply here if you find that problem - and the fix!
JerryDNYC
Oct 11, 2023Copper Contributor
It figures I got the update that fixes this problem right after posting this!
The version is now:
Version 2311 Build 16.0.17005.20000