I'm trying to setup a command using Xlwings within a Python script to set a specific cell within an Excel worksheet to an Excel Data type (e.g., Stocks, Currencies). I've found the VBA code that sets to these "newer" Excel Data types that return values from Microsoft's online services. However I'm not having any luck in getting this code to work.
Any feedback would be appreciated.
Using: MacOS: Sequoia v15.1 Excel: Excel for Mac 2021
Sample code:
wb = xw.Book(file)
sheet = wb.sheets('Stock_DataTable')
sheet.Range("B19").api.ConvertToLinkedDataType ServiceID:=268435456, LanguageCulture:= "en-US"
Expected result: format the cell as the specified data type and return the correct information from the web-service
Observed result: the call simply fails with a message saying that this is not a supported function.