Skip to main content

Connect to Azure OpenAI from Excel and Word

On Microsoft Excel and Word, GPT for Work can connect to Azure AI to use OpenAI models. You can connect to and use a single model at a time.

Prerequisites

Get your 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.

  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

Configure the Azure OpenAI endpoint

  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 API keys & endpoints.

    Set API keys
  4. Select the endpoints tab.

    Select the endpoints tab
  5. In the Azure endpoint section, define the endpoint settings:

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

    • Model ID: Enter the model name. GPT for Excel uses the name as the model's display name in the model switcher.

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

    Azure endpoint settings
  6. Click Check to validate the settings, and click Save.

    Check and save Azure endpoint settings

You have configured the Azure OpenAI endpoint in GPT for Excel. You can now select the model available through the endpoint.

Select the Azure OpenAI model

  1. Expand the model switcher. You can find the model under Use your API key or endpoint.

    Select a model
  2. Select the model.

GPT for Excel now uses the selected model to generate all responses.