Skip to main content

Connect to Azure OpenAI from Excel and Word

GPT for Excel and GPT for Word can connect to Azure AI to use OpenAI models. In Azure AI, each model has a dedicated API endpoint that you use to access the model.

Prerequisites

To use an Azure OpenAI model:

  1. Get the Azure OpenAI endpoint details for the model.

  2. Set up the Azure OpenAI endpoint.

  3. Select the Azure OpenAI model.

Get the Azure OpenAI endpoint details

To connect to Azure AI from GPT for Excel and Word, you need the endpoint URL, name, and API key for the Azure OpenAI model you want to use.

  1. Sign in to Azure AI Foundry.

  2. Select the Azure OpenAI resource that has the model you want to use.

  3. In the sidebar, select My assets > Models + endpoints.

    Select the sidebar menu item
  4. In Model deployments, in the models list, click the name of the model you want to use.

    Select the deployed model
  5. In the model details, copy the Target URI, Key, and Model name.

    Copy the endpoint details

Set up the Azure OpenAI endpoint

  1. Sign in to the GPT for Work dashboard with your Microsoft account.

  2. In the sidebar, select API endpoints.

  3. Click Azure OpenAI endpoints.

    tip

    If you already have Azure OpenAI endpoints set up, click Add another Azure OpenAI endpoint.

  4. Define the endpoint settings:

    • Endpoint URL: Enter the endpoint URL for the model.

    • Model name: Enter the model name.

    • API key: Enter the API key for accessing the endpoint.

    • Display name (optional): Enter a custom display name for the model. If not set, the model switcher uses Model name as the display name.

    Define Azure OpenAI endpoint settings
  5. Click Check to validate the settings and click Save.

    Define Azure OpenAI endpoint settings

You have set up the Azure OpenAI endpoint. You can now use the endpoint model in GPT for Excel and Word.

tip

To set up another Azure OpenAI endpoint with a different model, click Add another Azure OpenAI endpoint and repeat steps 4 and 5.

Set up another Azure OpenAI endpoint

Select the Azure OpenAI model

  1. Open a Microsoft Excel workbook.

  2. In the Home tab, click GPT for Excel Word.

    GPT for Excel Word in the Home ribbon
    info

    You can also select Home > Add-ins > My Add-ins > GPT for Excel Word.

  3. In the sidebar menu, select Bulk AI tools or GPT functions.

  4. Expand the model switcher. You can find the Azure OpenAI model under Use your API key or endpoint.

    Select a model
  5. Select the model.

GPT for Excel now uses the selected model to generate responses for bulk AI tools and GPT functions.