For everybody not familiar with installing add-ins or using a DOS command prompt, this guide explains in detail how to do install the Excel Add-in for Azure Machine Learning in Excel 2016.
We assume that you have an Azure Machine Learning experiment and that you published it as a predictive web service so you can call it from an Excel 2013/2016 spreadsheet. In order to call your Azure ML web service from Excel, you need to install the Azure Machine Learning Excel Add-in. All the screen pictures in this guide refer to Excel 2016 and Windows 10. This guide should also be easy to follow if you have Excel 2013 and Windows 8.1.
Azure Machine Learning: https://azure.microsoft.com/en-us/services/machine-learning/
Download the Azure Machine Learning Add-in for Excel 2013/2016
- To get the latest version of the add-in, go to https://azuremlexcel.codeplex.com/ and click on “Download” button.
- At bottom of browser, click Save to save the compressed file in Downloads (downloaded file is named “AzureMLPredictionRelease” with a hidden .zip suffix).
- Open File Explorer (Windows Key + R – type explorer and Enter). Double-click the Downloads folder to open it, select the file “AzureMLPredictionRelease”, click “Extract” in the top ribbon under the “Compressed Folder Tools” menu, and click “Extract All”.There is no need to change the folder in the next dialog box. If you did Save and file was downloaded to Downloads, the folder path will be similar to:
Click Extract in dialog box. The AzureMLPrediction.dll and AzureMLPrediction.tlb will be saved in the Release folder. The path to the .dll and .tld files is therefore:
Replace xxxxx with your user name, or use the %HOMEPATH% environment variable which contains your home folder:
Register the Azure Machine Learning Automation server.
- Find out if you have Office 2016 64-bit or 32-bit installed. In Excel 2016, under the File menu, click on Account and then on the “About Excel” button. At top of the dialog box, the following line is displayed “Microsoft Excel 2106 MSO (16.0.6701.1011) 32-bit” which tells me that the computer I am using is running Office 2016 32-bit.
- Open an OS prompt as an Administrator (Windows Key + X – click on “Command Prompt (Admin)” – Click Yes in Account Control dialog box). At the command prompt, type:
cd c:\windows\Microsoft.NET and Enter
- If you are running Office 2016 32-bit, type cd FrameWork and Enter. If you are running Office 2016 64-bit, type cd FrameWork64 and Enter. Then type dir and Enter.
- Write down the name of the last folder. On this computer, it is “v4.0.30319”. Type:
cd v4.0.30319 and Enter.
- Run the following command:
RegAsm /codebase “%HOMEPATH%\Downloads\AzureMLPredictionRelease\Release\AzureMLPrediction.dll” /tlb:”%HOMEPATH%\Downloads\AzureMLPredictionRelease\Release\AzureMLPrediction.tlb”
Note: there is no typo: /codebase does not need a “:” but /tbl: needs one). Make sure the output resembles the following:RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
Assembly exported to ‘C:\Users\xxxxx\Downloads\AzureMLPredictionRelease\Release\AzureMLPrediction.tlb’, and the type library was registered successful
- Start Excel 2016
Enable the Azure Machine Learning Automation server
This step is important, otherwise you will not be able to call the functions available in the Azure Machine Learning Excel Add-in.
- Under File menu, click on Options and then on Add-ins. At bottom of dialog box, make sure “Excel Add-ins” is selected in the Manage field and click on “Go…”
- In next dialog box, click on “Automation” button, select AzureMLPrediction.AzureMLPredict in the list and click OK
You are now back to the previous dialog box. Make sure AzureMLPrediction.AzureMLPredict is selected and click OK
Verify that the Azure Machine Learning functions are available in Excel
- In your spreadsheet, click on the insert Function symbol.
- You should now see a new function category and you can use all the functions listed for Azure Machine Learning
- All new spreadsheets that you create will have this Azure Machine Learning Add-in available. You need to do this installation only once.
To use this Azure Machine Learning Excel Add-in in Excel 2016 to consume a published predictive Machine Learning web service, see this post: