Excel Add-in for Machine Learning Studio (classic) web services
APPLIES TO: Machine Learning Studio (classic) Azure Machine Learning
Important
Support for Machine Learning Studio (classic) will end on 31 August 2024. We recommend you transition to Azure Machine Learning by that date.
Beginning 1 December 2021, you will not be able to create new Machine Learning Studio (classic) resources. Through 31 August 2024, you can continue to use the existing Machine Learning Studio (classic) resources.
- See information on moving machine learning projects from ML Studio (classic) to Azure Machine Learning.
- Learn more about Azure Machine Learning
ML Studio (classic) documentation is being retired and may not be updated in the future.
Excel makes it easy to call web services directly without the need to write any code.
Steps to Use an Existing web service in the Workbook
Open the sample Excel file, which contains the Excel add-in and data about passengers on the Titanic.
Note
- You will see the list of the Web Services related to the file and at the bottom a checkbox for "Auto-predict". If you enable auto-predict the predictions of all your services will be updated every time there is a change on the inputs. If unchecked you will have to click on "Predict All" for refresh. For enabling auto-predict at a service level go to step 6.
- The Machine Learning Excel add-in will call Office add-ins store to load. If your organization ban access to Office add-ins store, you will see error when loading the add-in. For this case, please deploy the Machine Learning Excel add-in from Microsoft 365 admin center. Then invoke the add-in and add the web service manually by paste the URL and API key.
Choose the web service by clicking it - "Titanic Survivor Predictor (Excel Add-in Sample) [Score]" in this example.
This takes you to the Predict section. This workbook already contains sample data, but for a blank workbook you can select a cell in Excel and click Use sample data.
Select the data with headers and click the input data range icon. Make sure the "My data has headers" box is checked.
Under Output, enter the cell number where you want the output to be, for example "H1" here.
Click Predict. If you select the "auto-predict" checkbox any change on the selected areas (the ones specified as input) will trigger a request and an update of the output cells without the need for you to press the predict button.
Deploy a web service or use an existing Web service. For more information on deploying a web service, see Tutorial 3: Deploy credit risk model.
Get the API key for your web service. Where you perform this action depends on whether you published a Classic Machine Learning web service of a New Machine Learning web service.
Use a Classic web service
In Machine Learning Studio (classic), click the WEB SERVICES section in the left pane, and then select the web service.
Copy the API key for the web service.
On the DASHBOARD tab for the web service, click the REQUEST/RESPONSE link.
Look for the Request URI section. Copy and save the URL.
Note
It is now possible to sign into the Machine Learning Web Services portal to obtain the API key for a Classic Machine Learning web service.
Use a New web service
- In the Machine Learning Web Services portal, click Web Services, then select your web service.
- Click Consume.
- Look for the Basic consumption info section. Copy and save the Primary Key and the Request-Response URL.
Steps to Add a New web service
Deploy a web service or use an existing Web service. For more information on deploying a web service, see Tutorial 3: Deploy credit risk model.
Click Consume.
Look for the Basic consumption info section. Copy and save the Primary Key and the Request-Response URL.
In Excel, go to the Web Services section (if you are in the Predict section, click the back arrow to go to the list of web services).
Click Add Web Service.
Paste the URL into the Excel add-in text box labeled URL.
Paste the API/Primary key into the text box labeled API key.
Click Add.
To use the web service, follow the preceding directions, "Steps to Use an Existing web Service."
Sharing Your Workbook
If you save your workbook, then the API/Primary key for the web services you have added is also saved. That means you should only share the workbook with individuals you trust.
Ask any questions in the following comment section or on our forum.